Renew the expired TLS certificate on Caddy
Why it matters
Browsers refuse to open a site whose certificate has expired and show visitors a full-page security warning. API clients and mobile apps fail outright, so the site is effectively down for them.
The fix
- Caddy obtains and renews certificates by itself, so an expired one means renewal is failing. Read the log (for a systemd install, journalctl -u caddy) for the ACME error.
- Check that ports 80 and 443 reach Caddy from the internet, that the DNS records for the host point at this server, and that no CAA record excludes your CA.
- Make sure the Caddy data directory is writable by the Caddy user. It stores the certificates and account keys.
- After fixing the cause, run caddy reload or restart the service and Caddy will retry.
bash
journalctl -u caddy --since "1 day ago" | grep -i -E "error|obtain|renew" sudo systemctl reload caddy
Related
- Reported by the certificate chain and expiry check
- Fix a certificate that is not valid yet
- Renew the certificate before it expires
- Install a certificate that covers this hostname
- Replace the self-signed certificate with a trusted one
- Use a certificate from a publicly trusted authority
- Serve the full certificate chain
- Replace the expired intermediate certificate
- Re-issue the certificate with a stronger key
- Replace the certificate that uses a broken hash
- Fix the certificate that browsers reject
Scan your domain to see whether this applies to you.