This package contains a DNS provider module for Caddy. It can be used to manage DNS records of domains in mittwald mStudio projects, through libdns/mittwald.
dns.providers.mittwald
To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:
{
"module": "acme",
"challenges": {
"dns": {
"provider": {
"name": "mittwald",
"api_token": "{env.MITTWALD_API_TOKEN}"
}
}
}
}or with the Caddyfile:
# globally
{
acme_dns mittwald {env.MITTWALD_API_TOKEN}
}
# one site
tls {
dns mittwald {env.MITTWALD_API_TOKEN}
}
The token is an mStudio API token; Caddy does not start when it is empty, for example because its environment variable is not set. It acts for its user in every project that user can access, so a dedicated user with access to the projects of the certificates' domains only is the safer choice.
mStudio keeps the records of every name in an object of its own. The first challenge for a name creates it, and its record takes longer until the nameservers serve it than a change for an existing name: 73 against 21 to 31 seconds, measured once. Caddy's default propagation timeout of two minutes covers that; raise it for more margin:
tls {
dns mittwald {env.MITTWALD_API_TOKEN}
propagation_timeout 5m
}