SSL certificate renewed but browsers not updating with new certificate

The && separates distinct shell commands, but --deploy-hook is an option to ./certbot-auto here so it doesn't belong in its own command. (You can't just run --deploy-hook by itself on the command line, which is effectively what this crontab entry is trying to do.) The corrected version would be

45 2 * * 6 cd /etc/letsencrypt/ && ./certbot-auto renew --deploy-hook "/usr/local/lsws/bin/lswsctrl restart"

This is more likely to work. :slight_smile:

Also, note that certbot renew only attempts to renew certificates that are less than 30 days from expiry. Therefore, it can be run quite frequently in most configurations without causing any harm. Your command above tries to run it only once per week, but we normally suggest running it twice per day. It won't try actually to renew your certificates twice per day unless there is some other kind of misconfiguration that causes all of the renewals to fail.

2 Likes