Ignore the Blueprint

A blog about programming, life and everything.

Quick Setup for Certbot


It's been a while since I built a website, but now it's so much easier. The following configuration is based on Ubuntu 22.04.1 LTS + nginx 1.18.0.

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
sudo certbot renew --dry-run #测试证书续期

At this point, accessing your website should already be using the https protocol. To automatically renew, you can create a scheduled task through crontab -e:

0 0 1 * * /usr/bin/certbot renew --force-renewal

That's it.