ACME.sh for Namecheap

Gold: https://dev.to/atomar/let-s-encrypt-ssl-certificate-in-namecheap-autorenewal-verified-working-using-acme-sh-4m7i

http://www.theopsfloor.com/wp-content/uploads/2023/09/Let’s-Encrypt-SSL-certificate-in-Namecheap-AutoRenewal-–-Verified-working-–-Using-ACME.sh-DEV-Co.pdf

#Get acme.sh utility
curl https://get.acme.sh | sh

#Source the Environment variables
source ~/.bashrc

#Register your email with Lets's Encrypt to be notified any renewals issue
acme.sh --register-account --accountemail email@example.com --server letsencrypt

At this moment a cron entry already has been setup for autorenewal which will auto renew after 60 days., You can update /dev/null to something like this if you need the log

crontab -l | grep acme.sh
10 0 * * * "/home/CPANEL_USERNAME/.acme.sh"/acme.sh --cron --home "/home/CPANEL_USERNAME/.acme.sh" >> /home/CPANEL_USERNAME/.acme_cron_log

Test issuing the cert. Add Alternate names (SAN/domain names with extra -d’s.


#webroot will be any directory in which your domain exist, give path accordingly.
acme.sh --issue --webroot ~/public_html -d yourdomain.com -d www.yourdomain.com --staging


acme.sh --issue --webroot ~/public_html -d yourdomain.com --force --server letsencrypt

#In ourput you will see success if all goes fine & key/Certs/chaincerts/csr will be stored under below location, you can refer those if you intend to apply those using cpanel GUI manually

~/.acme.sh/yourdomain.com/


acme.sh --deploy --deploy-hook cpanel_uapi --domain yourdomain.com