I guess if someone else won’t do it, and you can’t do it yourself, have Claude do it. I’d posted API-based DNS management back in January, suggesting/requesting the ability for NS8 to manage DNS records via your DNS hosts’ APIs. The discussion yesterday and earlier today about email client autoconfiguration reminded me of this, because it’d be helpful for whatever tool was used to actually set the relevant DNS records, rather than just show the admin what needs to be set.
There ensued a discussion with Claude, which pointed me to libdns, “universal DNS provider APIs for Go.” Over the course of the day, this module was built. Its purpose is to provide a simple interface for other modules, allowing them to create, edit, or delete DNS records. ns8-dnshelper stores the individual DNS zones and their associated credentials, so that (e.g.) the Mail or Webserver modules don’t have to. The README documents how your module can use this.
At this time, only five providers are supported: Cloudflare, Hetzner, Name.com, GoDaddy.com, and generic nsupdate/RFC2136. I’d like to add others, but don’t have domains/credentials to use to test (I’ve already paid for test domains with Hetzner, Name.com, and GoDaddy.com). If you do, and would be willing to share for a few hours, I’d appreciate hearing from you.
This is, of course, the initial release of an AI-coded tool that was built today. Bugs are expected, and testing is appreciated. Please let me know here, or on the issues page of the repo.
Improvements
- Testing, obviously.
- More DNS providers. If you can share a domain that’s using, e.g., Route53 or OVH (or Gandi, or anyone else libdns supports) for DNS, along with API credentials, implementing it shouldn’t take more than a matter of a few hours. I’d obviously recommend you share ephemeral credentials and revoke them once I’m done.
- Translations are AI-generated; I’d appreciate review (and PRs, if needed) by native speakers.