Reinstall LE on a different server with same certificates


#1

Good day!

I have LE properly installed and configured in my main server. However I created a copy of the website in a new server for testing new configurations. I have ca, crt, key, and pem files from LE in main server. How’s the proper way to reinstall LE to use those files?

First I added the repository:
sudo add-apt-repository ppa:certbot/certbot

Then I installed certbot:
sudo apt install python-certbot-nginx

Next thing, the output of ls /etc/letsencrypt is cli.ini.

So, how I manage to have all the default directories in /etc/letsencrypt to put my files in /live?

Thanks in advance.

Warm regards.


#2

It’s best to just copy the entire /etc/letsencrypt/ directory to your new server. You can’t just copy live.

Make sure you tar it up without wiping out the symlinks:

tar cf letsencrypt.tar /etc/letsencrypt/

and then extract it on the other side.


#3

Thank you so much for your answer @_az

The problem here is that in the main server runs a VestaCP installation, which has LE directories in a complete mess in locations I don’t even dare to look :sweat_smile:

So what I’m trying here in the new server it’s to configure everything from scratch and then, when everything it’s up and running, then use it as the main server and delete the other.

Thanks!


#4

If your new server isn’t VestaCP, you could just copy the private key and certificate to your new server (to any directory at all, doesn’t matter really) and configure nginx to use them.

Then once you switch the domains over to the new server, you can use Certbot to create a completely new set of certificates as required.


closed #5

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