This tutorial will help you to renew Let’s Encrypt certificates automatically. You don’t need to renew SSL certificates manually each time. The certbot script will take care of this and renew certificates before expiration.
Auto Renew Let’s Encrypt SSL
Certbot comes with a script to renew existing certificates. You can test renewal script with a single dry run like below.
sudo /usr/bin/certbot-auto renew --dry-run
If the above test succeeded, then create a cron job that will run the SSL renewal program for configured intervals. Configuring this script once a day is good enough.
Make sure the certbot binary script location as per below command. Let’s edit crontab with the following command.
Add the below command at end of fine and save it.
0 * * * * /usr/bin/certbot-auto renew
Some of the sysadmin’s keep script name certbot, So change the script name as per your setup.