Renew certificat


#1

Dear,

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

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


#2

Yes,

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


#3

And do i need to restart apache?


#4

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”


#5

thanks.

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


#6

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 )


#7

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