| Crates.io | certbot-dns01-hook |
| lib.rs | certbot-dns01-hook |
| version | 0.1.1 |
| created_at | 2025-11-04 15:39:38.885197+00 |
| updated_at | 2025-11-05 11:24:31.933775+00 |
| description | Hook for certbot to serve the DNS01 challenge secret TXT record |
| homepage | |
| repository | https://github.com/therealfrauholle/certbot-dns01-hook |
| max_upload_size | |
| id | 1916416 |
| size | 56,121 |
Serve DNS01 challenge secrets for certbot, compatible with any DNS provider.
If you require a quick setup to obtain certificates from Let's Encrypt using the DNS01 challenge for your small deployment, this script might be for you.
It is inspired by projects like https://github.com/joohoi/acme-dns or https://github.com/joohoi/acme-dns-certbot-joohoi.
The main reason to use this script is not to store DNS Api keys on your server (your provider might not offer access control), but further minimizing attack vectors by running minimal code only when needed.
The main reason not to use this script is because it is not tested well and might break your critical deployment.
This script is run as a manual post and pre hook for the certbot utility.
You must setup the configuration in /etc/letsencrypt/acme-map.toml, e.g. as follows:
soa = "acme.mydomain.org."
[domains]
"mydomain.org" = "root.acme.mydomain.org."
The machine where you install this script must be reachable from outside on port 53; and the port must not be used. You must configure this machine as the authority for the acme.mydomain.org zone with an NS entry at your primary dns server. There you must also setup a CNAME reference with name _acme_challenge.mydomain.org pointing to root.acme.mydomain.org (and one for every other domain you want to use this script for).
You can then issue the following command:
sudo certbot certonly \
--manual \
--manual-auth-hook certbot-dns01-hook \
--manual-cleanup-hook certbot-dns01-hook \
--preferred-challenges dns \
-d *.mydomain.org