Install Letsencrypt in Debian
To enable HTTPS on your website, you need to get a certificate (a type of file) from a Certificate Authority (CA). Let’s Encrypt is a CA. In order to get a certificate for your website’s domain from Let’s Encrypt, you have to demonstrate control over the domain. With Let’s Encrypt, you do this using software that uses the ACME protocol which typically runs on your web host. Documentation.
Since Debian 12 Bookworm (released 10 June 2023) Certbot available in "main" repo:
Edit /etc/nginx/sites-available/project file, find existing "server_name" line and update him:
Get certificate:
Certificate have 1 year expiration date and need for renew. Renew available by this command:
After all manipulations just reload Nginx:
Since Debian 12 Bookworm (released 10 June 2023) Certbot available in "main" repo:
sudo apt install certbot python3-certbot-nginx -ySee details in Debian wiki.
Edit /etc/nginx/sites-available/project file, find existing "server_name" line and update him:
server_name example.com www.example.com;Save and exit.
Get certificate:
sudo certbot --nginx -d example.com -d www.example.com
Certificate have 1 year expiration date and need for renew. Renew available by this command:
sudo certbot renew --dry-run
After all manipulations just reload Nginx:
sudo systemctl restart nginx
Support me on Patreon
#certbot #debian #letsencrypt #linux #nginx #python #ubuntu