LetsEncrypt with keepalived?

Hello, I currently have 2 droplets (web1 and web2) with a floating IP on top which is reassigned to web2 in the event that web1 fails using keepalived.

At the moment SSL lives on the web1 droplet. If web2 becomes active how can I get the SSL working on web2 and vice versa if web1 comes back online again?

I’m also hosting 20+ sites on the droplets with the possibility of adding more in the future.



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @EhJack

As long as the two servers are synchronized, then the private key of the SSL certificate will work from web2 even though they were generated on web1. Of course you should only generate the Let’s Encrypt certificates on web1 and then copy them over to web2, but you need to restart Apache on web2, when there’s a new certificate.

Or did I miss what you’re trying to accomplish?