Let’s Encrypt is a certificate authority that launched on April 12, 2016 that provides free X.509 certificates for Transport Layer Security (TLS) encryption via an automated process designed to eliminate the current complex process of manual creation, validation, signing, installation, and renewal of certificates for secure websites.
Steps To Use Let’s Encrypt On Vesta Login Panel
1 – Login to VestaCP’s admin panel using the hostname along with port 8083 in front of it like this https://server1.demo.com:8083
2 – Navigate to the WEB section of VestaCP and locate your server’s hostname and then click on EDIT as shown in the image below –
3 – Now locate SSL Support and Let’s Encrypt Support and make sure you check both of them. Then click on Save (DO NOT CLICK ANYWHERE TILL THE PROCESS IS DONE OR LETSENCRYPT MIGHT FAIL TO CREATE THE CERTIFICATE)
4 – Let’s encrypt creates and stores its SSL certs in /home/username/conf/web
And lists them as :-
Whereas VestaCP control panel stores its hostname SSL certs in:
and lists them as:
So, we need to rename the old VestaCP cert files first to some dummy text so that VestaCP no longer use them and then Symlink the files. Please follow the next steps to know how to do this.
5 – SSH into your server and enter these two commands to rename the old files :-
mv /usr/local/vesta/ssl/certificate.crt /usr/local/vesta/ssl/unusablecer.crt
mv /usr/local/vesta/ssl/certificate.key /usr/local/vesta/ssl/unusablecer.key
STEP 6 – Create symlinks to point to the new ones (Replace admin with your admin username and server1.casbay.com with your server’s hostname (FQDN).
ln -s /home/admin/conf/web/ssl.server1.casbay.com.crt /usr/local/vesta/ssl/certificate.crt
ln -s /home/admin/conf/web/ssl.server1.casbay.com.key /usr/local/vesta/ssl/certificate.key
7 – Restart VestaCP
service vesta restart
8 – Clear your browser cache and then try logging in to your control along with port 8083 and Bingo, port 8083 is now SSL secure!
Broken Permissions Solution
To fix broken permissions, enter the following commands.
Replace your.adminpanel.com with your admin panel’s URL.
chgrp mail ssl.your.adminpanel.com.key
chmod 660 ssl.your.adminpanel.com.key
chgrp mail ssl.your.adminpanel.com.crt
chmod 660 ssl.your.adminpanel.com.crt