Let’s Encrypt provides free SSL/TLS certificates that allow you to secure your website with HTTPS. Below is a basic guide for setting up Let’s Encrypt certificates for Nginx.
Prerequisites
- Domain name pointing to your server IP
- Nginx installed and running
- Ports 80 and 443 open in the firewall
- Root or sudo access to the server
Install Certbot
Install Certbot and the Nginx plugin using your package manager:
apt update
apt install certbot python3-certbot-nginx
Obtain the certificate
Run Certbot to automatically obtain and configure the certificate:
certbot --nginx -d example.com -d www.example.com
Follow the on-screen instructions to complete the setup.
Test automatic renewal
Let’s Encrypt certificates are valid for 90 days. Certbot installs a renewal timer automatically. You can test it with:
certbot renew --dry-run
Verify HTTPS
After completion, open your website in a browser and ensure it is accessible via https:// without certificate warnings.
Need help?
If you encounter issues or require assistance with advanced Nginx configurations, please open a support ticket in the Client Area.