How to migrate letsencrypt renewal from apache2 to nginx
I did this for 3 domains now and it worked, but try it at your own risk and make backups of original files before you do anything.
- Make sure you actually have the
nginx
plugin. You can install it with the commandsudo apt-get install python-certbot-nginx
- Edit
/etc/letsencrypt/renewal/*.conf
with an editor of your choice- I did
vim /etc/letsencrypt/renewal/DOMAIN.conf
- I did
- In each of these files, there are two lines where you need to replace
apache2
withnginx
authenticator: nginx
installer: nginx
Finally, to test if it went well, try renewing your certs with
certbot --dry-run renew
If you don't get any errors, it means the renewal succeeded.