Certbot renewal fails quietly. Nothing breaks until the certificate expires, and Let's Encrypt stopped sending expiry emails on June 4, 2025. On top of that, on a systemd server the cron entry everyone checks usually doesn't renew anything. Check the right scheduler first, then the certificate.
This is the Debian and Ubuntu package's cron entry, as cron logged it on one of our servers:
Dec 2 00:00:01 web01 CRON[3707]: (root) CMD (test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew)
-a \! -d /run/systemd/system means "and systemd is not running". On a systemd host that directory exists, the test fails, and the line ends there. The renewal comes from a systemd timer instead, which logs:
systemd[1]: Starting Certbot...systemd[1]: Started Certbot. On that server those lines showed up twice a day, including the 19 hours we had cron stopped. So a CMD line for certbot tells you cron is running. It doesn't tell you certbot renewed.
systemctl list-timers | grep -i certbotls -l /etc/cron.d/certbotcrontab -l | grep certbot
The certbot docs describe renewal as a scheduled task that runs certbot renew, from cron or a systemd timer. The Debian and Ubuntu package ships both a timer and the cron fallback above. A certbot renew line you added to a crontab yourself is one more scheduler, and you may now have two.
journalctl --since -3d | grep -i certbottail -50 /var/log/letsencrypt/letsencrypt.log Then try the whole renewal without touching the real certificates:
certbot renew --dry-run That's the fastest way to find a broken webroot, a port 80 that's closed now, or a DNS plugin whose credentials expired.
Whatever the scheduler says, the certificate is the thing that expires. Ask certbot, and ask the server what it's actually serving:
certbot certificatesecho | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -enddate If the two dates differ, certbot renewed and the web server never reloaded. Look at the deploy hook, or reload nginx or Apache.
Since certbot 4.0, a certificate is due for renewal when a third of its lifetime is left: 30 days on a 90-day certificate. Before 4.0 it was a fixed 30 days. Every renew run before that point does nothing anyway, so a renewal setup that broke can go unnoticed for weeks. The first visible sign is the expired certificate.
If renewal runs from cron (a server without systemd, or your own certbot renew line), Trunc learns that CMD line as a schedule and alerts when a run is late: missing log alerts. It only knows the job started, so --dry-run and the checks above are still how you find out it worked.
If it runs from the systemd timer, we don't learn timers yet. Watch the date instead. A daily line in /etc/cron.d that logs when the certificate has less than 14 days left:
30 6 * * * root openssl x509 -checkend 1209600 -noout -in /etc/letsencrypt/live/example.com/cert.pem >/dev/null || logger -t certcheck "example.com certificate expires within 14 days"
Search your logs for certcheck. That cron line is itself a daily schedule, so if cron stops, you hear about that too.
More on watching cron jobs in general: cron monitoring. The test where the certbot timer kept going without cron: we stopped cron for 19 hours.
Questions about Trunc or a trial: email us at sales@noc.org.
We love logs. In this section we will share some articles from our team to help you get better at logging.
Logging for fun and a good night of sleep.
Latest articles from our learning center.
Do you have an idea for an article that is not here? See something wrong? Contact us at support@noc.org
14 days free trial. No credit card required.