WHM generally has AutoSSL provided by cPanel (powered by Sectigo) setup as the default SSL certificate provider.
We've found the default cPanel SSL to be a bit problematic with renewals and wanted to switch to LetsEncrypt.
How to install & enable Let's Encrypt for AutoSSL on WHM
- In WHM, check Manage AutoSSL in case Let's Encrypt is already installed
- Open the WHM Terminal and run /usr/local/cpanel/scripts/install_lets_encrypt_autossl_provider
- Go back to Manage AutoSSL and choose Let's Encrypt as the AutoSSL Provider
- Run AutoSSL for all users
Let's walk through those step by step.
Check Manage AutoSSL
Log in to your WHM as the root user and go to SSL / TLS -> Manage AutoSSL.
Under the list of AutoSSL providers, check if Let's Encrypt is already installed.
If you haven't installed it yourself, it's probably not there and you'll only see "cPanel (powered by Sectigo)" as the only provider.
If you do see Let's Encrypt as an option, jump ahead to the section on enabling Let's Encrypt.
Install Let's Encrypt through the Terminal
In WHM, under Server Configuration, open the Terminal.
If you've logged in to WHM as "root", you should see [root@host ~].
If you see another username before @host, this may not work and you may need to try with the root login.
This will take you up a folder level.
Check you're at the correct folder level by entering:
This will list all the folders. Make sure you see "usr" as one of the folders.
Enter the following to run the Let's Encrypt installer:
You should start to see the Let's Encrypt installer working
If you don't see it working, you may need to go through the folders til you find install_lets_encrypt_autossl_provider.
You may need to wait for a few minutes for the installer to run.
When you see [root@host /]$ you can move on to the next step.
Choose Let's Encrypt
Go to SSL / TLS -> Manage AutoSSL. You should see Let's Encrypt as one of the AutoSSL Providers.
Select the radio button next to Let's Encrypt.
After you've read through the terms of service, select that you agree to them. Also select Recreate my current registration with "Let's Encrypt".
You'll see a green popup that says "You have created a new registration for this system with "Let's Encrypt" and configured AutoSSL to use that provider."
If you want to roll out AutoSSL throughout your sites, you can now click "Run AutoSSL For All Users".
Uninstall Let's Encrypt
If for some reason you ever want to uninstall Let's Encrypt as one of the AutoSSL providers, go to Terminal as the root user as we did for the install step and enter this command:
You should then go back to Manage AutoSSL, select cPanel (powered by Sectigo), save it, then run AutoSSL for all users.
And that's all there is to installing and activating Let's Encrypt on WHM.
Please let me know in the comments how you go and if you run into any issues not covered here.