jackover
16 March 2025
Image

Assuming Let's Encrypt is setup and we are using apache.
We can renew all certificates by running:
certbot renew --apache
But if we want to automate this, we can put this in a cronjob.
Run the following command as root:
crontab -e
Then insert this line:
0 */12 * * * root certbot -q renew --apache
Now the certificate will be checked every 12 hours, and refreshed if it expires withing 30 days.