Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Letsencrypt - Change installed certificates to use --webroot for renewal instead of --standalone

I have already set up certificates using the --standalone flag which is working great but the problem is I have to stop Nginx server every time I have to renew the certificates because the --standalone option requires port 80 to be free.

The --webroot method does not require stopping the server and essentially taking down all the sites on the server.

So is it possible to renew certificates using --webroot which were installed using the --standalone flag?

like image 651
Nikhil Chavan Avatar asked Apr 17 '16 15:04

Nikhil Chavan


1 Answers

I ended up also asking the same question on Letsencrypt forums where I got an answer.

Basically, when you have created certificate with --standalone plugin, just regenerate it with --webroot and then it can be updated with --webroot from next time onwards.

sudo ./letsencrypt-auto certonly -a webroot --renew-by-default -w <your-site-directory> -d <your-site>

like image 154
Nikhil Chavan Avatar answered Sep 20 '22 17:09

Nikhil Chavan