This package provides a DNS provider module for Caddy. It allows you to manage DNS records with ClouDNS for automated TLS certificate issuance via the ACME DNS challenge.
dns.providers.cloudns
auth_id
- ClouDNS Auth ID (required ifsub_auth_id
is not provided)sub_auth_id
- ClouDNS Sub Auth ID (required ifauth_id
is not provided)auth_password
- ClouDNS Auth Password (required)
To use this module, you need to build Caddy with this module included. The simplest way is to use xcaddy:
xcaddy build --with github.com/caddy-dns/cloudns
To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:
{
"apps": {
"tls": {
"automation": {
"policies": [
{
"issuers": [
{
"module": "acme",
"challenges": {
"dns": {
"provider": {
"name": "cloudns",
"auth_id": "CLOUDNS_AUTH_ID",
"sub_auth_id": "CLOUDNS_SUB_AUTH_ID",
"auth_password": "CLOUDNS_AUTH_PASSWORD"
}
}
}
}
]
}
]
}
}
}
}
You can also configure the module using the Caddyfile.
{
acme_dns cloudns {
auth_id "<auth_id>"
sub_auth_id "<sub_auth_id>"
auth_password "<auth_password>"
}
}
example.com {
tls {
dns cloudns {
auth_id "<auth_id>"
sub_auth_id "<sub_auth_id>"
auth_password "<auth_password>"
}
}
}
You can also set the following environment variables to configure the module:
CLOUDNS_AUTH_ID
- ClouDNS Auth IDCLOUDNS_SUB_AUTH_ID
- ClouDNS Sub Auth IDCLOUDNS_AUTH_PASSWORD
- ClouDNS Auth Password
Note: Configuration via environment variables will be used as a fallback if the corresponding parameters are not specified in the Caddy configuration.
The module includes built-in retry mechanisms with exponential backoff for all DNS operations:
- Default operation retries: 5
- Default initial backoff: 1 second
- Default maximum backoff: 30 seconds
These values are automatically configured and do not need to be specified in your configuration.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
This module is based on the libdns/cloudns package and the Caddy project.