下载安装acme.sh
curl https://get.acme.sh | sh
ZeroSSL注册
- 访问账户注册页面注册一个ZeroSSL账户,传送门
- 获取账户的EAB凭证,用来注册acme帐户,传送门
ACME登录
cd /root/.acme.sh
./acme.sh --register-account --server zerossl \
--eab-kid <你的eab-kid> \
--eab-hmac-key <你的eab-hmac-key>
Cloudflare环境变量配置
export CF_Token=<你的CF_Token> \
export CF_Account_ID=<你的CF_Account_ID> \
export CF_Zone_ID=<你的Zone_ID>
获取证书
acme.sh --issue --dns dns_cf -d <domain> -d *.<domain>
证书写入
cd /root/.acme.sh
./acme.sh --install-cert -d <域名> --key-file /root/cert/<域名>.key --fullchain-file /root/cert/<域名>.crt
配置 acme.sh 自动更新和自动更新证书
cd /root/.acme.sh
./acme.sh --upgrade --auto-upgrade
评论区