Overview
Introduction
A Let's Encrypt certificate expires every 90 days, so issuing one is only half the job, the other half is making sure it renews automatically without anyone remembering to run a command by hand.
This tool generates the renewal timer and cron snippet, with the web server reload hook already matched to Nginx or Apache, so the auto-renewal half of the setup is one paste.
What Is Certbot Renewal Config Generator?
A generator for Certbot's renewal automation: the systemd timer unit Certbot's Debian/Ubuntu package installs automatically, plus an equivalent cron line as a portable fallback.
Both forms include a --post-hook that reloads the chosen web server only when a certificate was actually renewed.
How Certbot Renewal Config Generator Works
You pick Nginx or Apache, which determines the service name used in the reload hook (nginx vs apache2).
The generator emits a command to check whether the timer is already active, the systemd timer unit text, an equivalent cron entry with the matching --post-hook, and a --dry-run command to verify the whole path.
When To Use Certbot Renewal Config Generator
Use it right after issuing a certificate with the Let's Encrypt Config Generator, to close the loop on auto-renewal.
It's also useful on its own as a quick reference when auditing whether an existing server's certificates will actually auto-renew.
Often used alongside Let's Encrypt Config Generator, Nginx Reverse Proxy Generator and Apache VirtualHost Generator.
Features
Advantages
- Matches the --post-hook reload command to the chosen web server (nginx vs apache2) automatically.
- Shows both the systemd-timer and cron renewal mechanisms, so the generated output is useful regardless of the target system's init system.
- Includes the --dry-run verification command so the renewal path can be tested immediately instead of trusted blindly.
Limitations
- Assumes Certbot is already installed and a certificate has already been issued, use the Let's Encrypt Config Generator first if not.
- The cron and timer schedules shown run twice daily, matching Certbot's own default; a different schedule needs manual adjustment.
Examples
Best Practices & Notes
Best Practices
- Confirm the renewal timer or cron job is actually active with `systemctl list-timers` or `crontab -l` after setup, not just assumed to be running.
- Run `sudo certbot renew --dry-run` right after setup to confirm the renewal path actually works.
- Prefer the systemd timer over the cron fallback when systemd is available, since it's what Certbot's own package manages and expects.
Developer Notes
The systemd timer shown (`OnCalendar=*-*-* 00,12:00:00` with a `RandomizedDelaySec`) matches the schedule Certbot's official Debian package ships, running twice daily since Let's Encrypt recommends attempting renewal well before a certificate's 90-day expiry; certbot renew itself only replaces certificates within 30 days of expiry, so the frequent schedule is intentionally a safe no-op most of the time.
Certbot Renewal Config Generator Use Cases
- Setting up auto-renewal immediately after issuing a first Let's Encrypt certificate
- Auditing or reinstating a broken auto-renewal schedule on an existing server
- Migrating a certificate's renewal hook after switching web servers (e.g. Apache to Nginx)
Common Mistakes
- Issuing a certificate and never verifying the renewal timer or cron job is actually active, then finding out it lapsed only when the certificate expires.
- Forgetting the --post-hook reload, so certbot renew replaces the certificate files but the running web server keeps serving the old, soon-to-be-expired one from memory.
Tips
- Run `sudo certbot renew --dry-run` right after setup to confirm the renewal path actually works, rather than waiting until 90 days from now to find out it doesn't.