На сайт

Бесплатный SSL на VPS. Let's Encrypt и certbot для Nginx

Как установить бесплатный SSL-сертификат Let's Encrypt на VPS: certbot + Nginx/Apache. HTTPS для сайта.

Бесплатный SSL на VPS через Let's Encrypt и certbot — HTTPS за несколько команд.

Условия

Домен указывает на IP VPS, порты 80/443 открыты.

apt install -y snapd
snap install core; snap refresh core
snap install --classic certbot
ln -sf /snap/bin/certbot /usr/bin/certbot
certbot --nginx -d example.com -d www.example.com

Для Apache: certbot --apache -d example.com.

certbot renew --dry-run

См. Nginx, Cloudflare.