acme.sh命令 Li.018

1. acme.sh 常见命令 # 查询所有命令 acme.sh -h # acme.sh更改申请证书机构 acme.sh --set-default-ca --server letsencrypt # http方式申请证书, lizicai.com域名, --webroot指定访问文件夹 acme.sh --issue -d lizicai.com --webroot /root/test/ # 手动dns申请证书 acme.sh --issue --dns -d lizicai.com # 使用dns提供接口, 自动dns申请证书, 以阿里云为例 export Ali_Key="Ali_Key" export Ali_Secret="Ali_Secret" acme.sh --issue --dns dns_ali -d lizicai.com # Cloudflare 为例 export CF_Key="你的Global API Key" export CF_Email="注册Cloudflare邮箱" acme.sh --issue --dns dns_cf -d \*.lizicai.com # 检查并更新所有证书 acme.sh --cron # 设置更新证书通知, 以钉钉 dingtalk通知为例 export DINGTALK_WEBHOOK='复制的Webhook' export DINGTALK_KEYWORD=acme acme.sh --set-notify --notify-hook dingtalk # 设置通知级别 # --notify-level <0|1|2|3> # Set the notification level: Default value is 2. # 0: disabled, no notification will be sent. 没有通知 # 1: send notifications only when there is an error. 有错误时才通知 # 2: send notifications when a cert is successfully renewed, or there is an error. 证书更新成功或错误才通知. # 3: send notifications when a cert is skipped, renewed, or error. 跳过证书, 更新证书, 错误都有通知. export NOTIFY_LEVEL='3' # 设置acme.sh 自动升级 acme.sh --upgrade --auto-upgrade 1 # 卸载acme.sh, 并删除所有acme.sh添加crontab任务. acme.sh --uninstall # 证书key和fullchain另存, 在获取证书时一起使用 --key-file /root/cert/lizicai.com/private.key --fullchain-file /root/cert/lizicai.com/fullchain.pem # 获取证书时使用, 可执行的一些命令 --reloadcmd "/usr/sbin/nginx -s reload" # 重新获取证书, 获取证书时使用 -r, --renew # 强制 -f 2. 具体使用可 参考acme.sh获取证书crontab更新及更新通知

July 27, 2021&nbsp;·&nbsp;1 分钟&nbsp;·&nbsp;Lizicai

acme.sh获取证书 设置crontab定时检查更新及更新通知 Li.017

1. acme.sh 是什么 1.1 一个纯粹用Shell(Unix shell)语言编写的ACME协议客户端. 支持shell就能安装. 1.2 支持非盈利证书颁发机构 letsencrypt.org , 可以自由获取免费证书. 1.3 可以自动更新证书. 1.4 支持主流的DNS服务商(DNSPod.cn(腾讯旗下) 阿里云 Cloudflare GoDaddy Amazon), 可申请通配符的证书. 全部DNS服务商支持列表 1.5 支持每次更新证书时发送通知, 支持主流QQ Dingtalk钉钉 Telegram Email Slack, 完整支持列表 2. 安装acme.sh, 设置默认证书分发机构为letsencrypt.org. 2.1 安装acme.sh curl https://get.acme.sh | sh -s [email protected] 2.2 设置默认证书分发机构为letsencrypt.org, 原因非盈利机构letsencrypt目前为止比较安全. ZeroSSL则是商业机构. 更多解释 . acme.sh --set-default-ca --server letsencrypt 3. 申请证书常用方式. http和dns方式. 3.1 http方式, 特点简单易操作.    以Nginx为例, 配置的文件夹/root/test/ 在default.conf增加配置 server{ listen 80; server_name lizicai.com; location / { root /root/test/; index index.html index.htm; } }    确认lizicai.com 解析a记录指向服务器ip 在域名服务商或DNS服务商增加lizicai.com指向服务ip的a记录. ...

July 26, 2021&nbsp;·&nbsp;2 分钟&nbsp;·&nbsp;Lizicai

acme.sh被收购 更换默认证书颁发机构为ZeroSSL 还安全吗? Li.005

1. acme.sh是什么. 1.1 acme.sh是实现ACME (自动证书管理环境 - Automatic Certificate Management Environment) 的客户端, ACME由 Let’s Encrypt 实现的协议。与该协议兼容的软件可以用它与 Let’s Encrypt 通信以获取证书. 1.2 acme.sh被ZeroSSL商业收购, acme.sh更改默认申请证书的服务商为ZeroSSL. 1.3 收购关系图, 被收购管理上复杂, 意味暴露信息更扩散, 更多的人有有这些数据权限. 2. 先说下我的观点.    开源都是爱发电的, 真的是用爱发电    开源能够商业收购, 即了不起也是幸运的事情, 毕竟内卷时代, 为爱发电, 又能获得收入实属难得    2021年7月21日, 官方文档中已明确说明默认证书申请机构是ZeroSSL(在这之前没有明确说明) 3. 为什么acme.sh更换默认证书颁发机构影响如此大. 3.1 使用acme.sh客户端申请证书人数众多 3.2 大部分用户翻墙科学上网就是使用这个acme.sh客户端申请证书. 3.3 每次申请证书暴露用户的信息. 申请服务器的IP 申请SSL证书的域名 域名DNS指向的IP acme.sh & ZeroSS 4. 暴露这么多信息, 会怎样? 4.1 目前想到比较紧急的    科学上网变得更不安全了, 商业公司的数据可能说卖就卖了, 被收购    那些使用CloudFlare 代理的用户也不再安全, 在申请证书时就暴露自己IP地址了 ...

July 18, 2021&nbsp;·&nbsp;1 分钟&nbsp;·&nbsp;Lizicai