This blog post describes how to manage large numbers of DNS records using git repositories by hosting domains with the DNS service provider luadns.com
Please contact us if anything is not clearly described, does not work, seems incorrect or if you require support.
This blog post is not sponsored by LuaDNS. We are simply enthusiasts of their service and wish to extend the same level of convenience to others grappling with the management of copious DNS records.
After a decade of experience into Linux hosting running Blunix Gmbh with a focus on automation and security, certain providers have risen to the top of our list. Among them stands luadns.com – a rock-solid service that follows the UNIXphilosophy of "do one thing and do it well". And the icing on the cake: It's free for up to five domains.
"Can you setup a new subdomain for xyz.example.com?" - these or similar request are a common inquery for sysadmins. Here are three technical approaches on how to handle such requests.
While utilizing web interfaces for DNS management is sufficient for smaller scales, those of us inclined toward automation, particularly when handling a plethora of domains, prefer the "infrastructure as code" approach.
Hetzner: Clicks to create a new domain: 1
LuaDNS (not german): Clicks to create a new domain: 2
IONOS: Clicks to create a new domain: 3
HostEurope: Clicks to domain: 6, if you can find the DNS management WebUI in the clutter of their admin UI
Employing an API offers a more efficient way to manage DNS repositories, especially when contending with thousands of records while working with a single DNS hosting provider
For an Linux managed hosting service provider like Blunix, where each customer has their very own IaaS provider accounts (blunix does not own ANY customer servers by design), this is less efficient, as pretty much all of our customers use different DNS providers. We have been on a crucade for the last years to migrate them all to luadns.com.
The cleanest method of DNS management involves keeping all domains in a git repository with one .lua file for each domain.
Signing up for a LUADNS account is free for up to five DNS zones – all you need is an email address. No credit card required.
LUADNS solely provides managed nameserver and does not resell domains. To utilize LUADNS name servers, update your NS records to:
Here is how this looks for Hetzner:
Or for IONOS:
Simply create a git repository in your GitHub or GitLab account and refer to this link for examples. Manage as many domains as you host with LUADNS within a single git repository.
Here is a screenshot of the very simple configuration for a webhook that is triggered by a git push to the "main" or "master" branch with Gitlab:
Configure git hooks to streamline domain updates with a simple push. Create a remote repository in your GitLab or GitHub account, such as "luadns," and set up a webhook to trigger upon pushing the repository's "main" or "master" branch.
For more detailed instructions, consult the LUADNS documentation on git integration.
Admin Anecdote: Once, a customer inadvertently misconfigured domains in their git repository and pushed them, which was rejected by LUADNS' API with an error. This prompted the admins of luadns.com to proactively reach out via email to rectify the mistake. Try to find a service provider with this level of engagement.
Are you looking for
Linux Emergency Support,
Linux Consulting for Projects,
Linux Managed Hosting,
Qubes OS Consulting and Support or
Linux Trainings and Workshops?