Skip to content

Create auto renewal SSL certificate

☣┌͜∩͜┐͜(͜◣͜_͜◢͜)͜┌͜∩͜┐☣ edited this page Feb 21, 2024 · 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]

Important

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 api access from Dynu to add the txt record to issue and renew a certificate

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

Issue certificate commands for other services:

FreeDNS

Export credentials:

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

Issue certificate:

acme.sh --issue --dns dns_freedns -d YOUR-DOMAIN --server CERT

DuckDNS

Export credentials:

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

Issue certificate:

acme.sh --issue --dns dns_duckdns -d YOUR-DOMAIN --server CERT