How to enable a Let's Encrypt certificate for the ISPConfig admin console

Ispconfig

You can use Let's Encrypt certificates for the ISPConfig admin console too.
In order to achieve this, you can use the following commands:

 
### as super user of course
DOMAIN="www.mydomain.com"
letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@${DOMAIN} --domains ${DOMAIN} --webroot-path /usr/local/ispconfig/interface/acme
dt=`date '+%Y%m%d%H%M%S'` 
cd /usr/local/ispconfig/interface/ssl/ 
for ext in csr key.secure key crt
do
 if [ -f ispserver.$ext ]
 then 
   mv ispserver.$ext ispserver.$ext.old.$dt
 fi
done
ln -s /etc/letsencrypt/live/${DOMAIN}/privkey.pem ispserver.key
ln -s /etc/letsencrypt/live/${DOMAIN}/fullchain.pem ispserver.crt
service apache2 restart