How to Use Dynu DNS with acme.sh for SSL Management

Installing acme.sh

sudo su -
mkdir .acme.sh
cd .acme.sh
curl https://get.acme.sh | sh -s email=your_email_address

Get Dynu DNS api

Export environment variables

export Dynu_ClientId="Client ID"
export Dynu_Secret="Secret"

Important

  • if you have used the wrong client ID or secret previously and with the error authentication failed, you need to delete the corresponding 2 lines from the below file:
~/.acme.sh/account.conf
  • otherwise the exporting even the correct credentials will not work using export ...

Create alias

Add below line to the end of your `~/.bashrc` file

alias acme.sh=~/.acme.sh/acme.sh
source ~/.bashrc

Generating certificate

acme.sh --issue --dns dns_dynu -d domain.com -d www.domain.com

Install the certificates

acme.sh --install-cert -d domain.com -d www.domain.com --key-file /etc/letsencrypt/live/domain.com/privkey.pem --fullchain-file /etc/letsencrypt/live/domain.com/fullchain.pem --reloadcmd "service apache2 force-reload"

Validation

  • Restart apache
sudo service apache2 restart
  • Open a browser, check the SSL certificate is updated