User Tools

Site Tools


Sidebar

certbot_lets_encrypt

Setup

https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/

apt-get update
sudo apt-get install certbot
apt-get install python3-certbot-nginx

vim/etc/nginx/conf.d/www.example.com.conf

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    root /var/www/html;
    server_name example.com www.example.com;
}

sudo systemctl restart nginx

Add domain

sudo certbot --nginx -d example.com

Renew all

sudo certbot renew

Automatically Renew Let’s Encrypt Certificates

sudo crontab -e

  
  0 12 * * * /usr/bin/certbot renew --quiet

certbot_lets_encrypt.txt · Last modified: 2022/03/09 01:55 by vissie