{"id":13453173,"url":"https://github.com/StackExchange/dnscontrol","last_synced_at":"2025-03-24T01:31:16.123Z","repository":{"id":37336462,"uuid":"66963716","full_name":"StackExchange/dnscontrol","owner":"StackExchange","description":"Infrastructure as code for DNS!","archived":false,"fork":false,"pushed_at":"2024-10-29T13:28:50.000Z","size":24180,"stargazers_count":3121,"open_issues_count":83,"forks_count":397,"subscribers_count":49,"default_branch":"main","last_synced_at":"2024-10-29T14:56:41.777Z","etag":null,"topics":["dns","dnscontrol","go","infrastructure-as-code","workflow"],"latest_commit_sha":null,"homepage":"https://dnscontrol.org/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackExchange.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-30T17:42:30.000Z","updated_at":"2024-10-29T13:28:54.000Z","dependencies_parsed_at":"2022-07-12T21:01:20.995Z","dependency_job_id":"ef07c910-5a95-4a43-bf96-31afe3c97e69","html_url":"https://github.com/StackExchange/dnscontrol","commit_stats":{"total_commits":2179,"total_committers":243,"mean_commits":8.96707818930041,"dds":0.5970628728774667,"last_synced_commit":"9dcd8c793ad564101bd541545034faccd62818f5"},"previous_names":[],"tags_count":130,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2Fdnscontrol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2Fdnscontrol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2Fdnscontrol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2Fdnscontrol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackExchange","download_url":"https://codeload.github.com/StackExchange/dnscontrol/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245194202,"owners_count":20575724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","dnscontrol","go","infrastructure-as-code","workflow"],"created_at":"2024-07-31T08:00:34.066Z","updated_at":"2025-03-24T01:31:16.116Z","avatar_url":"https://github.com/StackExchange.png","language":"Go","readme":"# DNSControl\n\n[![StackExchange/dnscontrol/build](https://github.com/StackExchange/dnscontrol/actions/workflows/pr_build.yml/badge.svg)](https://github.com/StackExchange/dnscontrol/actions/workflows/pr_build.yml)\n[![Google Group](https://img.shields.io/badge/google%20group-chat-green.svg)](https://groups.google.com/forum/#!forum/dnscontrol-discuss)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/StackExchange/dnscontrol)](https://pkg.go.dev/github.com/StackExchange/dnscontrol/v4)\n\n[DNSControl](https://docs.dnscontrol.org/) is a system\nfor maintaining DNS zones.  It has two parts:\na domain specific language (DSL) for describing DNS zones plus\nsoftware that processes the DSL and pushes the resulting zones to\nDNS providers such as Route53, Cloudflare, and Gandi.  It can send\nthe same DNS records to multiple providers.  It even generates\nthe most beautiful BIND zone files ever.  It runs anywhere Go runs (Linux, macOS,\nWindows). The provider model is extensible, so more providers can be added.\n\nCurrently supported DNS providers:\n\n- Akamai Edge DNS\n- AutoDNS\n- AWS Route 53\n- AXFR+DDNS\n- Azure DNS\n- Azure Private DNS\n- BIND\n- Bunny DNS\n- Cloudflare\n- ClouDNS\n- CentralNic Reseller (CNR) - formerly RRPProxy\n- deSEC\n- DigitalOcean\n- DNS Made Easy\n- DNSimple\n- Domainnameshop (Domeneshop)\n- Exoscale\n- Gandi\n- Gcore\n- Google DNS\n- Hetzner\n- HEXONET\n- hosting.de\n- Huawei Cloud DNS\n- Hurricane Electric DNS\n- INWX\n- Linode\n- Loopia\n- LuaDNS\n- Microsoft Windows Server DNS Server\n- Mythic Beasts\n- Namecheap\n- Name.com\n- Netcup\n- Netlify\n- NS1\n- Oracle Cloud\n- OVH\n- Packetframe\n- Porkbun\n- PowerDNS\n- Realtime Register\n- RWTH DNS-Admin\n- Sakura Cloud\n- SoftLayer\n- TransIP\n- Vultr\n\nCurrently supported Domain Registrars:\n\n- AWS Route 53\n- CSC Global\n- CentralNic Reseller (CNR) - formerly RRPProxy\n- DNSOVERHTTPS\n- Dynadot\n- easyname\n- Gandi\n- HEXONET\n- hosting.de\n- Internet.bs\n- INWX\n- Namecheap\n- Name.com\n- OpenSRS\n- OVH\n- Realtime Register\n\nAt Stack Overflow, we use this system to manage hundreds of domains\nand subdomains across multiple registrars and DNS providers.\n\nYou can think of it as a DNS compiler.  The configuration files are\nwritten in a DSL that looks a lot like JavaScript.  It is compiled\nto an intermediate representation (IR).  Compiler back-ends use the\nIR to update your DNS zones on services such as Route53, Cloudflare,\nand Gandi, or systems such as BIND.\n\n## An Example\n\n`dnsconfig.js`:\n\n```js\n// define our registrar and providers\nvar REG_NAMECOM = NewRegistrar(\"name.com\");\nvar r53 = NewDnsProvider(\"r53\")\n\nD(\"example.com\", REG_NAMECOM, DnsProvider(r53),\n  A(\"@\", \"1.2.3.4\"),\n  CNAME(\"www\",\"@\"),\n  MX(\"@\",5,\"mail.myserver.com.\"),\n  A(\"test\", \"5.6.7.8\")\n)\n```\n\nRunning `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.\n\nRunning `dnscontrol push` will make those changes with the provider and my dns records will be correctly updated.\n\nThe easiest way to run DNSControl is to use the Docker container:\n\n```\ndocker run --rm -it -v \"$(pwd):/dns\"  ghcr.io/stackexchange/dnscontrol preview\n```\n\nSee [Getting Started](https://docs.dnscontrol.org/getting-started/getting-started) page on documentation site to get started!\n\n## Benefits\n\n- **Less error-prone** than editing a BIND zone file.\n- **More reproducible**  than clicking buttons on a web portal.\n- **Easily switch between DNS providers:**  The DNSControl language is\n  vendor-agnostic.  If you use it to maintain your DNS zone records,\n  you can switch between DNS providers easily. In fact, DNSControl\n  will upload your DNS records to multiple providers, which means you\n  can test one while switching to another. We've switched providers 3\n  times in three years and we've never lost a DNS record.\n- **Adopt CI/CD principles to DNS!**  At StackOverflow we maintain our\n  DNSControl configurations in Git and use our CI system to roll out\n  changes.  Keeping DNS information in a VCS means we have full\n  history.  Using CI enables us to include unit-tests and\n  system-tests.  Remember when you forgot to include a \".\" at the end\n  of an MX record?  We haven't had that problem since we included a\n  test to make sure Tom doesn't make that mistake... again.\n- **Adopt PR-based updates.**  Allow developers to send updates as PRs,\n  which you can review before you approve.\n- **Variables save time!**  Assign an IP address to a constant and use the\n  variable name throughout the file. Need to change the IP address\n  globally? Just change the variable and \"recompile.\"\n- **Macros!**  Define your SPF records, MX records, or other repeated data\n  once and re-use them for all domains.\n- **Control Cloudflare from a single source of truth.**  Enable/disable\n  Cloudflare proxying (the \"orange cloud\" button) directly from your\n  DNSControl files.\n- **Keep similar domains in sync** with transforms and other features.  If\n  one domain is supposed to be a filtered version of another, this is\n  easy to set up.\n- **It is extendable!**  All the DNS providers are written as plugins.\n  Writing new plugins is very easy.\n\n## Installation\n\nDNSControl can be installed via packages for macOS, Linux and Windows, or from source code. See the [official instructions](https://docs.dnscontrol.org/getting-started/getting-started#1-install-the-software).\n\n## Via GitHub Actions (GHA)\n\nSee [dnscontrol-action](https://github.com/koenrh/dnscontrol-action) or [gacts/install-dnscontrol](https://github.com/gacts/install-dnscontrol).\n\n## Deprecation warnings (updated 2024-03-25)\n\n- **REV() will switch from RFC2317 to RFC4183 in v5.0.**  This is a breaking change. Warnings are output if your configuration is affected. No date has been announced for v5.0. See https://docs.dnscontrol.org/language-reference/top-level-functions/revcompat\n- **MSDNS maintainer needed!** Without a new volunteer, this DNS provider will lose support after April 2025. See https://github.com/StackExchange/dnscontrol/issues/2878\n- **NAMEDOTCOM and SOFTLAYER need maintainers!** These providers have no maintainer. Maintainers respond to PRs and fix bugs in a timely manner, and try to stay on top of protocol changes.\n- **get-certs/ACME support is frozen and will be removed without notice between now and July 2025.** It has been unsupported since December 2022.  If you don't use this feature, do not start. If you do use this feature, migrate ASAP.  See discussion in [issues/1400](https://github.com/StackExchange/dnscontrol/issues/1400)\n\n## More info at our website\n\nThe website: [https://docs.dnscontrol.org/](https://docs.dnscontrol.org/)\n\nThe getting started guide: [https://docs.dnscontrol.org/getting-started/getting-started](https://docs.dnscontrol.org/getting-started/getting-started)\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/StackExchange/dnscontrol.svg?variant=adaptive)](https://starchart.cc/StackExchange/dnscontrol)\n","funding_links":[],"categories":["Go","go","Integrations","Go (531)","workflow","Repositories"],"sub_categories":["completely supported"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackExchange%2Fdnscontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStackExchange%2Fdnscontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackExchange%2Fdnscontrol/lists"}