Let’s Encrypt DNS 簽證

安裝Cert-bot:

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx

增加Cloudflare 驗證組件:

apt install python3-pip
pip3 install certbot-dns-cloudflare

新增授權檔:

nano /etc/letsencrypt/cloudflare.ini

檔案內容填入:

dns_cloudflare_email = youremail
dns_cloudflare_api_key = CloudFlare Global API Key

退出存擋,開始簽證:

certbot certonly --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/cloudflare.ini -d domain

簽證完成後就完成囉,他會提示你檔案要保存在安全地方 可以改放至此位置 並chmod 600

~/.secrets/certbot/cloudflare.ini
chmod ~/.secrets/certbot/cloudflare.ini

certbot-dns-cloudflare
阅读剩余
THE END