What the message looks like
curl: (60) SSL certificate problem: certificate has expiredCommon causes
- Automatic renewal failed, e.g. port 80 blocked or DNS changed.
- The certificate was renewed, but nginx, Postfix or Dovecot was not reloaded.
- The certbot timer or cron job no longer exists, e.g. after a migration.
- The certificate was copied by hand and lives outside
/etc/letsencrypt/live. - The client clock is wrong – then even a valid certificate looks expired.
Check
- Show the validity of the certificate actually served
- Show expiry dates of certbot certificates
certbot certificates 2>/dev/null | grep -E 'Certificate Name|Expiry' - Check that the renewal timer is active
systemctl list-timers | grep -i certbot - Test renewal without fetching real certificates
certbot renew --dry-run
Fix
- Renew now:
certbot renewand reload the service. - Make the reload permanent:
--deploy-hook 'systemctl reload nginx'or a script in/etc/letsencrypt/renewal-hooks/deploy/. - Fix errors from
certbot renew --dry-run, typically firewall, DNS or changed vhosts. - Monitor expiry dates – a warning 14 days before expiry is enough.
- On mail servers remember that Postfix and Dovecot need a reload too.
Typical scenario
On Monday morning users report that the site shows 'certificate expired', although the certbot log says it renewed successfully weeks ago. certbot certificates lists an expiry in 60 days, yet the served certificate has expired. nginx holds the old certificate in memory and was not reloaded after the renewal. Compare what the server actually serves with what is on disk using openssl s_client -connect example.com:443 | openssl x509 -noout -dates.
FAQ
Why is the certificate expired although certbot renewed it?
The service keeps the old certificate in memory. Without a reload nginx keeps serving the old one even though the file on disk is new.
Can an intermediate certificate expire?
Yes. If the server sends an outdated chain, clients fail despite a valid server certificate. Always use the current fullchain.pem.
Why does the server not pick up the new certificate on its own?
Services read the certificate and key at start or reload. If the file changes afterwards, the running process keeps serving the old version. certbot therefore has to trigger a reload, for example with --deploy-hook 'systemctl reload nginx'.
Does this affect mail servers and other services too?
Yes, wherever the same certificate is used, such as Postfix, Dovecot or a proxy. Each of these services needs its own reload after renewal. Check the validity per port, not only on 443, with openssl s_client -starttls smtp.
The certificate is valid, yet old devices report 'expired'. Why?
That can come from the trust chain: an expired root certificate in the store of old devices or old OpenSSL versions makes the chain fail although the server certificate is valid. This happened, for example, on 30 September 2021 with the root 'DST Root CA X3'.