Migrating letsencrypt SSL certificates to another server

30th Dec 2017

If you're seeing this post, you're viewing my website from it's new home.

Moving the code and the data needed to run this website was made easy by docker and a Wordpress plugin called UpdraftPlus. For additional testing, I just tweaked my local hosts file to simulate the DNS change.

I also needed to move my SSL certs. I could have dropped the site back into plain http and requested the certs again using the certbot, but I decided against this as it would be more of a hassle.

You need to move the contents of two directories and one file in order to keep your site running SSL and so that certbot on the new server is aware of how to renew your website's SSL certs.

1: Copy the folder:

/etc/letsencrypt/live/yoursitedomain.com

2: Copy the folder:

/etc/letsencrypt/archive/yoursitedomain.com

3: Copy the file:

/etc/letsencrypt/renewal/yoursitedomain.com.conf

4: Copy the folder:

/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/someguiddirectoryname

LetsEncrypt community discussion thread:

"Moving and merging certs from server A to server B"