Guide for Setting Up ZeroSSL Certificate as Hostname SSL in CyberPanel

Setting Up and Verifying ZeroSSL for CyberPanel Hostname SSL

1. Obtain and Download ZeroSSL Files

  • Generate an SSL certificate for your CyberPanel hostname (e.g., host.yourdomain.com) using ZeroSSL.
  • Once the certificate is issued, download these files:
    • private.key – your private key file
    • certificate.crt – the main certificate
    • ca_bundle.crt – CA bundle with intermediate certificates

2. Upload the Certificate Files to Your Server

  • Transfer these files to your server, ideally placing them in /root/zerossl/.

3. Backup Existing Hostname SSL Files

  • To avoid losing the current SSL setup, make a backup of the existing CyberPanel hostname SSL files:

bash

Copy code

mkdir -p /etc/letsencrypt/live/host.yourdomain.com/backup/
cp /etc/letsencrypt/live/host.yourdomain.com/*.pem /etc/letsencrypt/live/host.yourdomain.com/backup/

4. Replace Existing SSL Files with ZeroSSL Files

  • Copy the downloaded ZeroSSL files to the necessary directory, renaming them to match the expected filenames:

bash

Copy code

cp /root/zerossl/private.key /etc/letsencrypt/live/host.yourdomain.com/privkey.pem
cp /root/zerossl/certificate.crt /etc/letsencrypt/live/host.yourdomain.com/cert.pem
cp /root/zerossl/ca_bundle.crt /etc/letsencrypt/live/host.yourdomain.com/fullchain.pem

5. Restart CyberPanel and OpenLiteSpeed

  • Restart CyberPanel and OpenLiteSpeed to apply the new SSL configuration:

bash

Copy code

systemctl restart lscpd
systemctl restart lsws

6. Verify the SSL Installation

  • Access CyberPanel at https://host.yourdomain.com:8090 to ensure it’s using the new ZeroSSL certificate. Check the browser’s SSL information to confirm the certificate details.

This guide provides a clear, general explanation for replacing the CyberPanel hostname SSL with a ZeroSSL certificate, suitable for any hostname. Let me know if there’s anything more to add!