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.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.