• Skip to primary navigation
  • Skip to main content

Magda Sicknick

  • About me
  • Articles
  • Portfolio

Add Certbot to shared GoDaddy hosting

Download and install acme.sh

acme.sh is a full implementation of a LetsEncrypt client but that doesn’t depend on Python/pip/virtualenv/etc, and that doesn’t require root — exactly what we need, since we don’t have root an a shared GoDaddy server, and we can’t install new software outside of our home directory.

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

Now log out and SSH back in so acme.sh‘s install is complete in every way (include the Bash alias).

Get a GoDaddy API Key

  1. Visit https://developer.godaddy.com/keys/
  2. Generate a production key (it made me produce a test key first for some reason…)
  3. In the SSH session you have open run these commands, but with each ...replaced by the value GoDaddy gave you in the previous step:
export GD_Secret=…
export GD_Key=…

Run the below:

acme.sh –issue -d MYDOMAIN.com -d www.MYDOMAIN.com -w ~/www –dns dns_gd

(NOTE: If you’re creating this cert for a domain that’s not the default domain being hosted on this server, then instead of ~/www you’ll need to do something like ~/www/MYOTHERDOMAIN.COM.)

Boom! You should have just gotten your first good news of the day — your cert, cert key, intermediate CA cert, and full cert chain have been generated!

…but GoDaddy still doesn’t know that the cert exists, so it’s not using it.

Upload cert and private key to GoDaddy via acme.sh –deploy

  1. Use nano to open ~/.acme.sh/deploy/cpanel_uapi.sh, uncomment the DEPLOY_CPANEL_USER variable at the top, set its value to your username
  2. Run acme.sh --deploy -d MYDOMAIN.com --deploy-hook cpanel_uapi

After ~30 seconds, you should see output like this!

[Sun Sep 17 03:17:45 MST 2017] Certificate successfully deployed
[Sun Sep 17 03:17:45 MST 2017] Success

Once complete, edit the cronjob file with

EDITOR=nano VISUAL=nano crontab -e

and replace MYDOMAIN.com and the other domains with your own domains:

0 0 1 * * ~/.acme.sh/acme.sh –cron –home ~/.acme.sh –force 2>&1 >> ~/.acme.sh/cronlog.txt
1 0 1 * * ~/.acme.sh/acme.sh –deploy -d MYDOMAIN.com –deploy-hook cpanel_uapi
2 0 1 * * ~/.acme.sh/acme.sh –deploy -d SOMEOTHERDOMAIN.org –deploy-hook cpanel_uapi
3 0 1 * * ~/.acme.sh/acme.sh –deploy -d THIRDDOMAIN.com –deploy-hook cpanel_uapi

Hit CTRL+X, type ‘Y’, and ENTER to save.

Tadaa, you now have a fully automated LetsEncrypt certificate on your site(s)!

Published on April 24, 2019

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Let’s Talk

Looking to get your business a website or update your current online presence?

Please send me information about you project so that I can determine how to best fulfill your needs.

    Service Required *

    Copyright© 2023 · Magda Sicknick · All Rights Reserved · Powered by Wordpress and the Genesis Framework.