https://certbot.eff.org/instructions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 安装snapd
sudo apt update
sudo apt install snapd
sudo snap install core; sudo snap refresh core
# 安装certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot

# 运行
sudo certbot certonly --nginx
# 配置
sudo certbot --nginx
# 手动更新证书(会自动更新,这里只是测试)
sudo certbot renew --dry-run