acme.sh

About

acme.sh. A pure Unix shell script implementing ACME client protocol.

acme.sh issue a Let's Encrypt certificate for you. See How Let's Encrypt works.

Usage

Nginx + Cloudflare

Prerequisites

A domain & use Cloudflare nameserver

Install acme.sh

curl https://get.acme.sh | sh

Configure

dns api

export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export CF_Email="xxxx@sss.com"

Issue cert

acme.sh --issue --dns dns_cf -d f00bar.cn -d '*.f00bar.cn'

Install cert

acme.sh --install-cert -d f00bar.cn --cert-file /etc/nginx/ssl/f00bar.cer --key-file /etc/nginx/ssl/f00bar.key --fullchain-file /etc/nginx/ssl/fullchain.cer --reloadcmd "service nginx force-reload"

Other

Renew

acme.sh --renew-all

Add cron job

acme.sh --install-cronjob

Add alias

alias acme.sh="~/.acme.sh/acme.sh"

Last modification:May 25th, 2020 at 07:14 pm
If you think my article is useful to you, please feel free to appreciate