With this guide you will be able to set up free auto-renewing SSL (Let’s Encrypt) certificates on GoDaddy hosting.
a. A complete guide to configuring SSH
b. if point (a) is not available:
- Enable SSH for your Linux Hosting account
- Set up your SSH keys
- Connect to your server with SSH (Secure Shell)
Open your terminal (console) and run the command:
username
— Find your username for Linux Hostingprimary.host
— Find your primary host on GoDaddy hosting
Upon successful execution of the command, you will get remote access to the hosting. You will notice this by the changed device name in your terminal. All subsequent commands will be executed on the hosting itself.
Just for reference: acme.sh source code and docs
To install acme.sh
, you need to run one command:
curl https://get.acme.sh | sh
And re-login to ssh:
exit
Go to step 2. Then step 4.
You will need a script to automatically apply new SSL certificates to the GoDaddy server.
Download post-renew-hook.php script to your computer.
Open GoDaddy file manager in your browser
Show hidden files in file manager
Copy post-renew-hook.php
script file to the folder with acme.sh: /home/<username>/.acme.sh/
Also, you need keys to work acme.sh
with the GoDaddy server.
As stated in the acme.sh
documentation: Use GoDaddy.com domain API to automatically issue cert
You need to login to your GoDaddy account to get your API Key and Secret.
https://developer.godaddy.com/keys/
Create a Production key, instead of a Test key.
Execute the command in ssh substituting the your values:
export GD_Key="yourKey"
export GD_Secret="yourSecret"
Now you can start issuing certificates. Specify your domain instead example.com
. If you have subdomains, then you need to specify additionally *.example.com
so that the certificate is applied to them as well.
acme.sh --issue --dns dns_gd -d example.com -d *.example.com --renew-hook "php ~/.acme.sh/post-renew-hook.php example.com"
Remember to replace the last example.com
in --renew-hook
to your domain.
You can repeat this step for each domain on your hosting.
Now you have free SSL certificates configured on your hosting! Your sites are available via HTTPS protocol. If you did everything according to the instructions, then the certificates will be updated automatically, without your participation. Isn't that cool?