Renew certificat



I generate certificats for my domains byu runnig the command :
certbot certonly -w /home/sitexxx/web/www -d -d
certbot certonly -w /home/sitexxx/web/www -d -d
certbot certonly -w /home/sitexxx/web/www -d -d

To renew all domain in one time
can I launch the command
certbot renew



using “certbot renew” will check and renew any certificates that are due for renewal


And do i need to restart apache?


You will need to reload apache, yes ( reload is “nicer” than restart - as it does it gracefully and doesn’t stop existing connections). I’d suggest using the “–renew-hook” command which will only be run if a certificate is renewed e.g.

certbot renew --renew-hook “service apache2 reload”



I was thinking to a
`service apache2 graceful
but i think reload are even better

And I guess I can add in a crontab
00 2 * * 1 /usr/local/sbin/certbot renew --renew-hook "service apache2 reload" >> /var/log/le-renew.log


Yes you can.

Personally I run it daily, rather than weekly as you have in that cron (since certbot checks the certs and only renews them when they are within 30 days of expiry, there is no downside to running it daily )


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.