CPanel SSL: Issue free certificates in a non-root server
Since some shared hosting providers are tied to an option to buy a SSL certificate, with the help of the acme.sh
script, you can issue free SSL certificates following the instructions:
📈 Go to the Terminal into your CPanel or SSH there
⬇️ Get the acme.sh script
🔃 Refresh the terminal
Re-enter to the terminal or simply run
✉️ Register your email with the certificate
⏰ Check if cronjob was enabled by acme
The above command should output something like:
📦 Set the domain variables in the terminal
🔑 Testing if the certificate generation works
Before testing if generate the certificate is allowed, you need the path of the domain / subdomain from your Cpanel. Execute the following command and you’ll get the path
The result will be stored into DOMAINPATH
Then, you can use Acme to generate a STAGING certificate
Remember to only add
-d $WWWDOMAIN
, if you are using awww
alias for your domain
If you receive green checks / messages. Congrats! You’re able to generate certificates into your Cpanel account.
🍄 Generating a real SSL certificate
➕ Add your certificate to Cpanel
Remember, you’ll need to repeat each step from step “Set the domain variables in the terminal” and forward by each domain / subdomain whenever you add it.