webzod
account

Renew the expired TLS certificate on Caddy

tls.cert.expired · effort: minutes

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

  1. 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.
  2. 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.
  3. Make sure the Caddy data directory is writable by the Caddy user. It stores the certificates and account keys.
  4. 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

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.