Blog

How to tell that a certificate renewal failed silently

Automatic renewal works until one day it does not, and nothing tells you. This guide covers the three ways a renewal fails quietly, a check from outside that works whatever client you use, and where to look in certbot, Caddy, Traefik and Nginx Proxy Manager.

Three ways a renewal fails quietly

  1. The renewal never runs. A timer was disabled, a cron entry got lost when the server was rebuilt, a container restarts without its scheduler, or the site moved to a new machine and the renewal setup stayed on the old one.
  2. It runs and fails, and nobody reads the log. Validation fails because port 80 is closed or redirected, the API token for the DNS provider expired, a CAA record does not allow the CA, or a rate limit was hit.
  3. It succeeds, and the server keeps sending the old certificate. The service was never reloaded, the certificate is copied to a load balancer or appliance by hand, or a second server behind the same name renews on its own, or not at all.

The third one is the hardest to spot: the client reports success, and the log looks fine.

Check from outside first

Whatever your client says, what counts is the certificate your server sends. This shows it, with the CA that issued it and when it was issued:

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
  | openssl x509 -noout -issuer -startdate -enddate

notBefore is when the certificate was issued, notAfter when it expires. If more than about two thirds of the time between them has passed, the renewal is late. For a 90-day certificate that is day 60, for a 64-day certificate day 43.

For a mail server, add the protocol: -connect mail.example.com:25 -starttls smtp (or port 587). Ports 465, 993 and 995 speak TLS directly and need no -starttls.

Then compare with the public Certificate Transparency logs, where every public certificate is recorded when it is issued. Search for the name at crt.sh. If the logs list a newer certificate than the one your server sends, the renewal worked and the deployment did not. If the newest certificate in the logs is the one your server sends and it is past two thirds of its life, the renewal itself is failing.

Certbot

Caddy

Traefik

Nginx Proxy Manager

Get told instead of looking

All of the above is useful when you suspect a problem. To hear about one without looking, combine the client's failure output with one outside check that knows when each certificate should have been renewed. Our guide on what replaces the Let's Encrypt expiry emails compares the options.

TTLwatch does the outside part: it reads the certificate each endpoint sends twice a day, compares it with the CT logs, and alerts once when a renewal is overdue for that certificate's lifetime or a new certificate was never deployed. Internal hosts report through a short shell script.

Sources

Check your own domain

Free, no signup. We read the domain's public certificate history and the certificates its servers send now, and tell you per hostname whether the renewals keep up with the coming lifetimes.