SSL Certificates
Overview
Option 1: Reverse Proxy (Recommended)
Nginx with Let's Encrypt
sudo apt install certbot python3-certbot-nginxsudo certbot --nginx -d auth.example.comserver {
listen 443 ssl http2;
server_name auth.example.com;
ssl_certificate /etc/letsencrypt/live/auth.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/auth.example.com/privkey.pem;
# SSL settings
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
ssl_prefer_server_ciphers off;
# HSTS
add_header Strict-Transport-Security "max-age=63072000" always;
location / {
proxy_pass http://127.0.0.1:4000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name auth.example.com;
return 301 https://$server_name$request_uri;
}Traefik with Let's Encrypt
Option 2: Direct SSL
Generate Self-Signed Certificate (Development)
Configure Authority
Using Let's Encrypt Certificates
Certificate Renewal
Certbot Auto-Renewal
Manual Renewal Hook
Security Headers
Verify SSL Configuration
Troubleshooting
Certificate chain incomplete
Permission denied
Mixed content warnings
Next Steps
Last updated
Was this helpful?