📜 Automatic SSL Certificate Generation for Duck DNS Domains
| .github/workflows | ||
| scripts | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
Let's Encrypt for Duck DNS
Automatically generates Let's Encrypt certificates using a lightweight Docker container without requiring any ports to be exposed for DNS challenges.
Environment Variables
DUCKDNS_TOKEN: Duck DNS account token (obtained from Duck DNS) (required)DUCKDNS_DOMAIN: Full Duck DNS domain (e.g.test.duckdns.org) (required)LETSENCRYPT_EMAIL: Email used for certificate renewal notifications (optional)LETSENCRYPT_DOMAIN: Domain to generate SSL cert for. By default SSL certificate is generated forDUCKDNS_DOMAIN(optional)LETSENCRYPT_WILDCARD:trueorfalse, indicating whether the SSL certificate should be for subdomains only ofDUCKDNS_DOMAIN(i.e.*.test.duckdns.org), or for the main domain only (i.e.test.duckdns.org) (optional, default:false)TESTING:trueorfalse, indicating whether a staging SSL certificate should be generated or not (optional, default:false)UID: User ID to apply to Let's Encrypt files generated (optional, recommended, default:0- root)GID: Group ID to apply to Let's Encrypt files generated (optional, recommended, default:0- root)
Notes
-
The format of
DUCKDNS_DOMAINshould be the same regardless of the value ofLETSENCRYPT_WILDCARD. -
In order to use
LETSENCRYPT_DOMAINfeature, the following DNS records need to be created for ACME authentication
<LETSENCRYPT_DOMAIN> CNAME -> <DUCKDNS_DOMAIN>
_acme-challenge.<<LETSENCRYPT_DOMAIN> CNAME -> _acme-challenge.<DUCKDNS_DOMAIN>
Volumes
<certs>:/etc/letsencrypt: A named or host volume which allows SSL certificates to persist and be accessed by other containers
Note: To use the <certs> host volume in another container, mount it as read-only for those containers. The <certs> host volume should be read-write enabled for the Letsencrypt container.