Install Let’s Encrypt SSL for WHM Services & Hostname
This guide explains how to secure your WHM/cPanel server’s hostname and services with a Let’s Encrypt SSL certificate, including generating a self-signed certificate first, configuring AutoSSL, and verifying the setup.
Prerequisites
- Ensure your server’s hostname (e.g.,
server.example.com
) has a valid A record pointing to its IP address. - WHM/cPanel must be updated to the latest version.
Steps to Follow
Step 1: Generate a Self-Signed Certificate for the Hostname
(Required to avoid SSL errors before installing Let’s Encrypt)
- Log in to WHM as the root user.
- Navigate to: SSL/TLS → Generate an SSL Certificate and Signing Request.
- Under Generate a Self-Signed Certificate, fill in the following:
- Host to Generate For: Select your server’s hostname (e.g.,
server.example.com
). - Email Address: Enter a valid email (optional but recommended).
- Key Size:
2048
(default). - Company details
- Passphrase
- Host to Generate For: Select your server’s hostname (e.g.,
- Click Generate.
- If you have root access you can find the certificate at this location:
/etc/ssl/certs/hostname.crt
Step 2: Set Let’s Encrypt as the AutoSSL Provider
- In WHM, go to: SSL/TLS → Manage AutoSSL.
- Under AutoSSL Provider, select Let’s Encrypt™.
- If you are not using Let’s Encrypt™, then ensure you update all your existing SSL certificates with Let’s Encrypt™. (See tab Manage Users)
- Click Save.
Step 3: Install Let’s Encrypt SSL for the Hostname
- Navigate to: SSL/TLS → Manage Service SSL Certificates.
- Under Service Certificates, click Browse Certificates for the following services:
- Calendar, cPanel, WebDisk, Webmail, and WHM Services
- Dovecot Mail Server
- Exim (SMTP) Server
- FTP Server
- Select the generated certificate. Sort by expiration date and choose the certificate which expires in 1 year. It will also have your hostname (e.g.,
server.example.com
) - The certificate details will be auto filled.
- Check all the services
- Click → Install.
Step 4: Update All Services with the New SSL
- Login as root using command line and run the following command via SSH to apply the SSL certificate to all services:
#
/usr/local/cpanel/bin/checkallsslcerts
- Wait for the process to complete.
Step 5: Verify the SSL Installation
- Access WHM securely via:
https://server.example.com:2087
- Check the SSL certificate in your browser to confirm it’s issued by Let’s Encrypt.
- Use this website to test the Installed SSL on your host: https://www.ssllabs.com/ssltest/index.html
Troubleshooting Tips
- If the certificate fails to install:
- Ensure the hostname’s DNS resolves correctly (
ping your-hostname
). - Check the server’s firewall allows outbound HTTP/HTTPS traffic (required for Let’s Encrypt validation).
- Ensure the hostname’s DNS resolves correctly (
- For further help, contact your hosting provider or cPanel support.
- Note: Let’s Encrypt certificates auto-renew every 90 days. WHM handles this automatically if AutoSSL is enabled.