直接进入官网: Certbot | Certbot

选择对应的操作系统, 根据文档操作即可.

2021-12-06 ubuntu20 云服务器 亲测可行

which snap || (sudo apt update && sudo apt install snapd)
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx

---------------------------------------------------------

Before 2021/12/06

以下命令摘自该官网, Ubuntu18+nginx下亲测可行:(其他系统的请自行上官网查看对应安装方法)

sudo apt-get update
sudo apt-get install -y snap
sudo snap install --classic certbot
sudo certbot --nginx
sudo certbot renew --dry-run

如果报snap not found 就这样:

sudo apt install snapd

------------------------------------------------------------------------------------以下是旧的内容, 缺点是配完需要手动启动定时任务更新证书

Can not be more simple, 简单得不能再简单的,letsencrypt——只需一行代码:

git clone https://github.com/certbot/certbot.git && ./certbot/letsencrypt-auto

然后根据提示操作即可

以上是我个人的成功经验,官网的方法是:| Certbot

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐