DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Let's Encrypt SSL with auto-renew on GoDaddy in 4 steps
Ezequiel Esnaola
Ezequiel Esnaola

Posted on

Letsencrypt Godaddy Let's Encrypt SSL with auto-renew on GoDaddy in 4 steps

I recently tried to install a Let's Encrypt SSL certificate on GoDaddy and I did'n find enough information to configure auto-renew.

It is simplified in 4 simple steps steps everything you need to install a free certificate and save some πŸ’ΈπŸ’ΈπŸ’Έ
Β 

1. Connecting via SSH to your server

You must enable SSH access from your cPanel and log in with your credentials.

$ ssh [username]@[hostname]
Enter fullscreen mode Exit fullscreen mode

Β 

2. Install acme.sh

Download this repo and install it.

$ curl https://get.acme.sh | sh
Enter fullscreen mode Exit fullscreen mode

Β 

3. Issue the certificate

You only need write access to the web root folder to issue the certificate.

$ acme.sh --force --issue -d example.com -d www.example.com  -w /home/[username]/public_html
Enter fullscreen mode Exit fullscreen mode

Β 

4. Deploy the certificate

There are 2 ways to implement the certificate and both leave the cronjob configured.

a. Deploy SSL to cPanel using UAPI (GoDaddy option)

This hook is using UAPI and works in cPanel & WHM version 56 or newer.

$ acme.sh --deploy -d example.com -d www.example.com --deploy-hook cpanel_uapi
Enter fullscreen mode Exit fullscreen mode

b. Deploy SSL to cPanel (other cPanel version)

DEPLOY_CPANEL_USERΒ andΒ DEPLOY_CPANEL_PASSWORDΒ is required only once.

$ export DEPLOY_CPANEL_USER=myusername
$ export DEPLOY_CPANEL_PASSWORD=PASSWORD
$ acme.sh --deploy -d example.com -d www.example.com --deploy-hook cpanel
Enter fullscreen mode Exit fullscreen mode

For more documentation see theΒ GitHub Wiki

I hope this may help you!

Top comments (4)

Collapse
 
sylver9 profile image
sylver9 • Edited on

I kept getting this error:
The deploy hook cpanel is not found.

acme.sh --deploy -d example.com -d example.com --deploy-hook cpanel
I even tried channel_uapi and the resulting error noted that cert files were missing. And they were. Because one needs to create an account acme.sh --register-account -m user@example.com
before using acme.sh --force --issue

Collapse
 
nuukem profile image
Nuukem • Edited on

This is great. Thank you so much!

Will this auto deploy the new SSL to cPanel when the certificate renews?

Collapse
 
drix93 profile image
Adrian Dixon

Hi Ezequiel, great simple and useful article. How would I go about doing an SSL for two domains example: my-domain.com and my-domain.ca?

Collapse
 
drix93 profile image
Adrian Dixon • Edited on

I think I might have answered my own question:

By just adding "-d my-domain.com" along with it's www. counterpart and any others.

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.