- Checked
- 2026-11-14
Renewing a Let's Encrypt certificate with Certbot
Certbot should renew on its own, quietly, several times a year. When it stops, nothing tells you until browsers do. This page is for before that point: test the renewal, fix what breaks it, and make sure the web server picks up the new file.
See what Certbot manages
certbot certificates lists each certificate, the names on it, when it expires and where its files are. If the site's certificate is not in that list, Certbot did not issue it, and renewing with Certbot will not touch it.
/etc/letsencrypt/renewal/example.com.conf records how a certificate was issued, the authenticator line in particular. A renewal repeats exactly that.
Test the renewal
certbot renew --dry-run runs the whole renewal against Let's Encrypt's staging service and saves nothing. If it passes, the real renewal will pass too. If it fails, the message names the domain and the challenge that failed.
Why the dry run fails
- Timeout or connection refused on the http-01 challenge: port 80 is closed, in the server's firewall or the provider's. Let's Encrypt checks over port 80 even when the site serves only https.
- Wrong address or a 404 on the challenge: DNS points somewhere else, at a CDN or a new server, or the web server sends
/.well-known/acme-challenge/to the app instead of the folder Certbot writes to. Could not bind to port 80: the certificate was issued with the standalone plugin, which needs port 80 free, and the web server holds it now. Switch to the nginx or apache plugin, or to--webroot.- A wildcard certificate,
*.example.com, can only be validated through DNS. If it was issued with--manualand no hook script, it cannot renew on its own; it needs a DNS plugin for your DNS provider. - Too many failed attempts: Let's Encrypt limits failed validations per hostname. Work on the cause with the dry run, which uses the staging service and its looser limits.
Make the web server use the new certificate
nginx and Apache keep the certificate they loaded at start. Certbot's nginx and apache plugins reload them for you. With --webroot or standalone, add a deploy hook, which runs only after a successful renewal:
certbot renew --deploy-hook "systemctl reload nginx"Certbot keeps options used on a renewal for later runs. An executable script in /etc/letsencrypt/renewal-hooks/deploy/ does the same job for every certificate.
Check that renewal runs at all
The package installs a systemd timer or a cron job that runs certbot renew twice a day. systemctl list-timers | grep -i certbot shows the timer, called snap.certbot.renew.timer for the snap install; ls /etc/cron.d/ shows a cron entry. If neither exists, nothing renews. After a move to a new server this is the first thing to check: the timer does not travel with the certificates.
Shorter certificates are coming
Let's Encrypt certificates last 90 days today. Let's Encrypt has announced 64 days from 10 February 2027 and 45 days from 16 February 2028. Certbot 4.0 and later renew once less than a third of the lifetime is left, so shorter certificates simply renew more often. A renewal run by hand on a fixed calendar, every 60 days for example, will break.
What not to do
- Do not run
certbot certonlyagain and again to force it through. Each run asks for a new certificate and counts toward Let's Encrypt's limits; use the dry run until it passes. - Do not delete
/etc/letsencryptto start over. It holds your account key and every certificate's history. - Do not copy only the
livefolder to a new server. The files there are links intoarchive; copy all of/etc/letsencrypt, or issue new certificates on the new server.
When to stop and hand it over
Stop if the dry run fails on a challenge you cannot explain, if the certificate sits behind a CDN or a load balancer, or if it has already expired and visitors see the warning. Our Server Rescue is one incident at a fixed $69, with a same-day start listed at $109, and nothing to pay if we cannot fix it. The fix includes finding why renewal stopped.
Questions people ask
- How often does Certbot renew?
- Its timer runs twice a day, and it renews a certificate once less than a third of its lifetime is left: about 30 days before expiry for a 90-day certificate.
- Do I need to restart nginx after a renewal?
- A reload is enough, and the nginx plugin does it for you. With webroot or standalone, use a deploy hook.
- Can I renew before the certificate is due?
- Yes,
certbot renew --force-renewalrenews right away. Do it rarely: it counts toward Let's Encrypt's limits. - What does fixing a failed renewal cost?
- With us, Server Rescue at $69 for the incident, or $109 for a same-day start. If we cannot fix it, you pay nothing.
Where each statement comes from
Checked against the sources on .
- Certbot user guide (eff-certbot.readthedocs.io)
- Let's Encrypt: challenge types (letsencrypt.org)
- Let's Encrypt: rate limits (letsencrypt.org)
- Let's Encrypt: staging environment (letsencrypt.org)
- Let's Encrypt: upcoming features (letsencrypt.org)
More server help
- SSL certificate expired: the fix
- Too many redirects
- DNS not resolving or still on the old server
- Linux server hardening checklist
- Server down: what to check first
- 502 Bad Gateway on nginx
- 504 Gateway Timeout
- Error establishing a database connection
- WordPress white screen or critical error
- 403 Forbidden on nginx or Apache
- Disk full: no space left on device
- Email from the server going to spam
- Website hacked: the first steps
- Moving a site to a new server
- All server help guides
