I end up getting a self-signed certificate every time I try to assign an SSL from Manage SSL, Hostname SSL, or MailServer SSL on Cyberpanel. I have a properly working certificate generated through nginx/certbot. I’m thinking of just manually changing the certificate used for cyberpanel with that from certbot. Where can I find the files associated with the certificate and key for Cyberpanel’s Hostname SSL and MailServer SSL?
Hello,
To manually replace your SSL certificates on the server, follow these steps:
- Edit the LiteSpeed configuration
Modify the following files:
/usr/local/lsws/conf/httpd_config.conf
/usr/local/lsws/conf/vhosts/domain.com/vhost.conf
Search for the section:
listener SSL
and update the certificate paths accordingly.
- Update the certificates for the panel and webmail
Copy your custom certificates to the following paths:
cp /etc/ssl/custom/domain.com/fullchain.crt /usr/local/lscp/conf/cert.pem
cp /etc/ssl/custom/domain.com/your_key.key /usr/local/lscp/conf/key.pem
- Restart the services to apply the changes
systemctl restart lsws
systemctl restart lscpd
After this, both your main site and webmail should use the new SSL certificate correctly.
If you ever need a professional system administrator to assist you in the future, feel free to reach out. More info: https://soporteserver.com