Is it possible transfer lets encrypt certificate to other server?

Now, I have a Debian 10 server with Haproxy. On the other server I plan to install Debian 10 with Haproxy too. Is possible I use “Lets encrypt certificate” in my old Debian server to my new Debian server with only copying the certificate via rsync ?. Thanks.

Yes, absolutely. You just need to rsync privkey.pem and fullchain.pem from /etc/letsencrypt/live/. Making sure to dereference the symlink (-L parameter with rsync).

You can also get Certbot to trigger the rsync after renewal, by using --deploy-hook or by putting an executable script in /etc/letsencrypt/renewal-hooks/deploy.

You can find a lot more information about deployment hooks on this page: https://certbot.eff.org/docs/using.html#renewing-certificates

3 Likes

Ok. Thanks for your answer.