Setup FREE Let’s Encrypt SSL on Namecheap by using ACME.SH in cPanel

Author: ctl    Posted: 5 October 2022   Viewed: 129179 times   Tag: #Linux 

There is free way to get SSL certificate on Namecheap.com. The followings are the steps to install Let’s Encrypt SSL on Namecheap.com.


1. Open Terminal on cPanel


2. Setup acme.sh in cPanel

Install acme.sh using the command below:

curl https://get.acme.sh | sh


Run the following command:

source ~/.bashrc


To be notified of any issues with respect to renewal among others, you would need to register your email address.


Run the code below:

acme.sh --register-account  --accountemail myemail@mydomain.com


3. Issue a Real Certificate for Your Domain

You need to get the webroot of your domain. Typically, it should be located here ~/public_html


Reason: The acme.sh changed default CA to ZeroSSL on August 2021. Therefore, you need to run this:

acme.sh --set-default-ca --server letsencrypt


acme.sh --issue --webroot ~/public_html -d mydomain.com -d www.mydomain.com --force


4. Install the Certificate to Your cPanel Account

Run the command below to get it deployed to your cpanel account.

acme.sh --deploy --deploy-hook cpanel_uapi --domain mydomain.com --domain www.mydomain.com


PS: Check that acme.sh has enabled a cronjob that does that for you automatically! Run the code below to get that going:

crontab -l | grep acme.sh



Your Kind Action