Skip to main content

CWP: How to Auto Renew Let's Encrypt SSL Certificate for your server Hostname/FQDN on CWP7.admin

Check certificate expiry time to verify that renewal has worked:
# openssl x509 -noout -dates -in /etc/letsencrypt/live/ 
notBefore=Jan 12 13:16:11 2019 GMT
notAfter=Apr 12 13:16:11 2019 GMT
Add the Cron job
# crontab -e
0 */12 * * * certbot renew --cert-name --renew-hook "systemctl restart httpd && systemctl restart cwpsrv" 
To test the renewal process, you can use the certbot --dry-run switch:
 # certbot renew --cert-name --dry-run 
If there are no errors, it means that the renewal process was successful.

Check the log:
# tail -f /var/log/letsencrypt/letsencrypt.log


2019-01-13 02:05:42,952:DEBUG:certbot.renewal:Dry run: skipping updating lineage at /etc/letsencrypt/live/
2019-01-13 02:05:42,954:DEBUG:certbot.updater:Skipping updaters in dry-run mode.
2019-01-13 02:05:42,955:DEBUG:certbot.renewal:no renewal failures

Helpful Link: