Caddy
Caddy obtains its certificates on its own. Two settings are enough to make it use local-cert instead of Let's Encrypt directly.
| Value | Where to find it | In this guide |
|---|---|---|
| ACME directory | fixed for each instance | https://certs.example.com/acme/directory |
| Key ID (kid) | Keys & access → EAB credentials | eab_XXXXXXXXXXXXXXXX |
| HMAC key | shown only once, at creation | CLE_HMAC |
For all sites
In the global options block, at the top of the Caddyfile:
Caddyfile
{
email ops@example.com
acme_ca https://certs.example.com/acme/directory
acme_eab {
key_id eab_XXXXXXXXXXXXXXXX
mac_key CLE_HMAC
}
}
nas.home.example.com {
reverse_proxy 192.168.1.50:5000
}For a single site
If Caddy also serves public sites that must stay with Let's Encrypt, declare the issuer in the relevant site:
Caddyfile
nas.home.example.com {
tls {
issuer acme {
dir https://certs.example.com/acme/directory
eab eab_XXXXXXXXXXXXXXXX CLE_HMAC
disable_tlsalpn_challenge
}
}
reverse_proxy 192.168.1.50:5000
}Good to know
- Caddy only requests a certificate for a real domain name. A
.localor.internalname, or an IP address, gets a certificate from its internal CA, without going through local-cert. - Caddy tries TLS-ALPN-01 and HTTP-01; local-cert only offers HTTP-01, and Caddy falls back to it on its own.
disable_tlsalpn_challengejust skips the attempt. - After changing CA, reload (
caddy reload). Certificates already obtained keep being used until they are renewed.