I just created my first cron job for renewing certs using certbot-auto. The advice and examples for this online are all over the map, but I found what I think is the recommended solution–running certbot-auto renew twice a day at random times withing designated hours. Would some gurus be willing to just look over my code here and tell me if this is correct? Much appreciated. This is on Amazon Linux EC2 with Apache 2.4. Certbot-auto is installed in the ec2-user home directory.
It should appear in the cron log (either /var/log/cron or journalctl -u cron) and also in /var/log/letsencrypt/.
Yes, that should work.
That's right.
To expand on this, it depends what installer was used to issue the certificate. If you used certonly or --installer/-i none, then you will need to restart Apache manually. If you used --apache, then you don't need to do anything.
I noticed when I ran certbot-auto renew --debug manually earlier today, it seemed to indicate that Apache was restarted and the date shown by my browser was correctly updated, so I’m thinking I don’t need to add an Apache restart to the cron job.
new certificate deployed with reload of apache server; fullchain is
/etc/letsencrypt/live/test.swansislandcompany.com/fullchain.pem