Skip to content

acme.sh

acme.sh is a pure Unix shell script implementing ACME client protocol.

Install acme.sh

Terminal window
curl https://get.acme.sh | sh -s email=my@example.com
# or
wget -O - https://get.acme.sh | sh -s email=my@example.com

Add an alias for acme:

Terminal window
echo 'alias acme.sh=~/.acme.sh/acme.sh' >> ~/.bashrc

Usage with nginx

Obtaining SSL Certificates

Terminal window
acme.sh --issue --dns dns_ionos -d "your-domain.com" \
--webroot nginx/html \
--cert-file "../nginx/ssl/your-domain.com.crt" \
--key-file "../nginx/ssl/your-domain.com.key" \
--fullchain-file "../nginx/ssl/your-domain.com.fullchain.crt" \
--reloadcmd "docker restart nginx"

Deploying Certificates to Nginx

Terminal window
acme.sh --install-cert -d "your-domain.com" \
--key-file "../nginx/ssl/$DOMAIN.key" \
--fullchain-file "../nginx/ssl/your-domain.com.fullchain.crt" \
--reloadcmd "docker restart nginx"

Renew Certificates

Terminal window
acme.sh --renew --dns dns_ionos -d your-domain.com \
--cert-file nginx/ssl/your-domain.com.crt \
--key-file nginx/ssl/your-domain.com.key \
--fullchain-file nginx/ssl/your-domain.com.fullchain.crt \
--reloadcmd "docker restart nginx"

Usage with Ionos domains

Get a prefix and a secret from the …

Export these as variables

Terminal window
export IONOS_PREFIX="..."
export IONOS_SECRET="..."

Now execute the commands before with the --dns dns_ionos flag.