sudo certbot --nginx -d example.com -d www.example.com
Category: Self-Hosting
sudo certbot --nginx -d example.com -d www.example.com
Request a free Let's Encrypt TLS certificate and auto-configure Nginx to use it
The one-command HTTPS setup: requests a free certificate and automatically edits your Nginx config to use it. Certbot also sets up auto-renewal.