Infrastructure as code for DNS!
3,935
stars
3,047
commits
Go
primary language
Sep 10, 2026
updated
DNSControl is Infrastructure as Code for DNS. It includes a full-featured configuration language (Javascript-compatible), plus "plug-ins" that speak to DNS provider APIs such as AWS Route 53, Cloudflare, and Gandi. It can send the same DNS records to multiple providers. It runs anywhere Go runs (Linux, macOS, Windows). The provider model is extensible, so more providers can be added.
dnsconfig.js:
// define our registrar and providers
var REG_NAMECOM = NewRegistrar("ndc_main");
var DSP_ROUTE53 = NewDnsProvider("r53_main")
D("example.com", REG_NAMECOM, DnsProvider(DSP_ROUTE53),
A("@", "1.2.3.4"),
CNAME("www","@"),
MX("@",5,"mail.myserver.com."),
A("test", "5.6.7.8")
)
Running dnscontrol preview will talk to the providers (here name.com as registrar and route 53 as the dns host), and determine what changes need to be made.
Running dnscontrol push will make those changes with the provider and my dns records will be correctly updated.
The easiest way to run DNSControl is to use the Docker container:
docker run --rm -it -v "$(pwd):/dns" ghcr.io/dnscontrol/dnscontrol preview
Want full "GitOps" control of your DNS data? Clone this repo to get started! github.com/DNSControl/dns-config
See Getting Started page on documentation site to get started!
DNSControl supports 65 DNS providers and registrars:
¹also supports registrar functions ²registrar only
DNSControl can be installed via packages for macOS, Linux and Windows, or from source code. See the official instructions.
The official Github Action is: github.com/dnscontrol/dnscontrol-action
Others have been created such as:
Want to contribute? Whether it's fixing a bug, adding a new DNS provider, or improving documentation, contributions are welcome. See CONTRIBUTING.md for how to get started.
The website: https://docs.dnscontrol.org/
The getting started guide: https://docs.dnscontrol.org/getting-started/getting-started
(top 30 of 303)
Hacker News (2)
Go
94.3%
JavaScript
4.5%
Infrastructure as code for DNS!
3,935
stars
3,047
commits
Go
primary language
Sep 10, 2026
updated
DNSControl is Infrastructure as Code for DNS. It includes a full-featured configuration language (Javascript-compatible), plus "plug-ins" that speak to DNS provider APIs such as AWS Route 53, Cloudflare, and Gandi. It can send the same DNS records to multiple providers. It runs anywhere Go runs (Linux, macOS, Windows). The provider model is extensible, so more providers can be added.
dnsconfig.js:
// define our registrar and providers
var REG_NAMECOM = NewRegistrar("ndc_main");
var DSP_ROUTE53 = NewDnsProvider("r53_main")
D("example.com", REG_NAMECOM, DnsProvider(DSP_ROUTE53),
A("@", "1.2.3.4"),
CNAME("www","@"),
MX("@",5,"mail.myserver.com."),
A("test", "5.6.7.8")
)
Running dnscontrol preview will talk to the providers (here name.com as registrar and route 53 as the dns host), and determine what changes need to be made.
Running dnscontrol push will make those changes with the provider and my dns records will be correctly updated.
The easiest way to run DNSControl is to use the Docker container:
docker run --rm -it -v "$(pwd):/dns" ghcr.io/dnscontrol/dnscontrol preview
Want full "GitOps" control of your DNS data? Clone this repo to get started! github.com/DNSControl/dns-config
See Getting Started page on documentation site to get started!
DNSControl supports 65 DNS providers and registrars:
¹also supports registrar functions ²registrar only
DNSControl can be installed via packages for macOS, Linux and Windows, or from source code. See the official instructions.
The official Github Action is: github.com/dnscontrol/dnscontrol-action
Others have been created such as:
Want to contribute? Whether it's fixing a bug, adding a new DNS provider, or improving documentation, contributions are welcome. See CONTRIBUTING.md for how to get started.
The website: https://docs.dnscontrol.org/
The getting started guide: https://docs.dnscontrol.org/getting-started/getting-started
Hacker News (2)
(top 30 of 303)
Go
94.3%
JavaScript
4.5%