Skip to content

Create auto renewal SSL certificate

trinib edited this page May 8, 2022 · 10 revisions

Let's Encrypt or ZeroSSL

An ACME Shell script - A pure Unix shell script implementing ACME client protocol

Install script:

curl https://get.acme.sh | sh -s [email protected]

IMPORANT:After the installation, you must close the current terminal and reopen it to make the alias take effect.

acme.sh is in constant development, so it's strongly recommended to use the latest code

Enable auto upgrade:

acme.sh --upgrade --auto-upgrade

Disable auto upgrade:

acme.sh --upgrade --auto-upgrade 0

Using DNS alias mode for validation from a DNS API access.(Using Dynu hostname)

Get Dynu API credentials from your Dynu account:

Export clientId and secret :

export Dynu_ClientId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export Dynu_Secret=yyyyyyyyyyyyyyyyyyyyyyyyy

Issue a cert from Zerossl:

acme.sh --issue --dns dns_dynu -d YOUR-DOMAIN --server zerossl

Issue a cert from Let's Encrypt:

acme.sh --issue --dns dns_dynu -d YOUR-DOMAIN --server letsencrypt

or

For Letsencrypt.org production server:

acme.sh --issue --dns dns_dynu -d YOUR-DOMAIN --server letsencrypt --preferred-chain "ISRG"

For letsencrypt.org staging server:

acme.sh --issue --dns dns_dynu -d YOUR-DOMAIN --server letsencrypt --preferred-chain "(STAGING) Pretend Pear X1"

Go to AdGuard Home admin panel encryption settings:

  • Enter server name

  • Check redirect to HTTPS automatically

  • Set certificate file path

  • Set certificate private key file

FreeDNS

Export credentials:

export FREEDNS_User="yourusername"
export FREEDNS_Password="yourpassword"

Command line:

acme.sh --issue --dns dns_freedns -d....

DuckDNS

Export credentials:

export DuckDNS_Token="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Command line:

acme.sh --issue --dns dns_duckdns -d....