By Brian Can
I have followed the tutorial “How To Secure Apache with Let’s Encrypt on Ubuntu 20.04” to add a free SSL secure certificate to my website deployed in my droplet ubuntu server.
After all done, I just noticed that the cert seems valid no more than 3 months. So wonder how I can make sure the Let’s Encrypt certbot did set my cert to automatic renew in order to avoid insecure site when the cert expires. Is there a way to check the status of the renew setting?
Thanks, Brian
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @Canbrian,
If you’ve followed the tutorial and have used certbot create the certificates, If I’m not mistaken they will be renewed automatically after a certain period.
Having said that to be on the safe side, I’ll recommend you adding a cronjob that does it automatically for you and even updates the certs in your webservice.
$ crontab -e
Add the certbot command to run daily. In this example, the command is run every day at noon. The command checks to see if the certificate on the server will expire within the next 30 days, and renews it if so. The --quiet directive tells certbot not to generate output.
0 12 * * * /usr/bin/certbot renew --quiet
Save and close the file. All installed certificates will be automatically renewed and reloaded.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.