Sharing a LetsEncrypt certificate with Apache and OpenVPN

You may want to share your LetsEncrypt certificate with Apache and OpenVPN. Once you have the certificate configured in Apache, and (any) custom certificate configured in OpenVPN, updating it alongside your Apache cert is as simple as:


letsencrypt-auto -d [domain] certonly
cp -L /etc/letsencrypt/live/[domain]/cert.pem /usr/local/openvpn_as/etc/web-ssl/server.crt
cp -L /etc/letsencrypt/live/[domain]/privkey.pem /usr/local/openvpn_as/etc/web-ssl/server.key
cp -L /etc/letsencrypt/live/[domain]/chain.pem /usr/local/openvpn_as/etc/web-ssl/ca.crt
service openvpnas restart