@lsby/cloudflare-certbot-dns-hook

0.0.1 • Public • Published

cloudflare-certbot-dns-hook

方便的对运行在cloudflare上的域名进行certbot-dns挑战.

安装

npm i -g @lsby/cloudflare-certbot-dns-hook

使用

先安装certbot.

接下来创建两个文件, windows和linux略有不同.

  • 文件后缀名略有不同, windows是.cmd.bat, linux是.sh.
  • 设置环境变量的方法略有不同, windows是set, linux是export.

下面的的示例使用windows的写法:

auth.cmd:

set CLOUDFLARE_API_TOKEN=<cloudflare的token>
set CLOUDFLARE_ZONE_ID=<cloudflare域名的区域id>

lsby-cloudflare-certbot-dns-hook-auth

cleanup.cmd:

set CLOUDFLARE_API_TOKEN=<cloudflare的token>
set CLOUDFLARE_ZONE_ID=<cloudflare域名的区域id>

lsby-cloudflare-certbot-dns-hook-cleanup

最后执行命令:

certbot certonly --manual --non-interactive --preferred-challenges=dns --manual-auth-hook <auth文件路径> --manual-cleanup-hook <cleanup文件路径> --agree-tos -m <邮箱> -d <完整子域名>

Readme

Keywords

none

Package Sidebar

Install

npm i @lsby/cloudflare-certbot-dns-hook

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

5.23 kB

Total Files

5

Last publish

Collaborators

  • hbybyyang