Updating a Let’s Encrypt certificate
Updating a Let’s Encrypt certificate depends on how it was originally issued. Here’s a step-by-step guide based on different scenarios:
1. If You Used Certbot (Recommended)
Certbot is the most common way to obtain and renew Let’s Encrypt certificates.
Check Expiry Date
Run:
This shows your existing certificates and their expiration dates.
Renew Certificates
Run:
This attempts to renew all certificates that are expiring within 30 days.
Restart Web Server (If Required)
After renewal, restart your web server (e.g., Apache or Nginx) to apply the new certificate:
Verify the Renewal
Once done, check if your certificate is updated:
If everything is working correctly, your SSL certificate should now be renewed!
Cron renew
$ crontab -u root -e
00 00 25 * * systemctl stop httpd && certbot renew && systemctl start httpd