Ubuntu Certbot renewal tip

I just found something out around Certbot Auto-renews. When you are running Apache and Certbot to manage LetsEncrypt SSL certificates. Apache needs to restart in order for the new certificate to be applied. Im not sure how I didn’t know this before, considering I have been running Apache/Ubuntu for many years.

However..There is a solution.

Create a bash script in the folder “/etc/letsencrypt/renewal-hooks/deploy/” This script should contain the below code. This will only be executed when LetsEncrypt has successfully renewed a certificate.

 service apache2 restart

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.