Step 1 — Installing Certbot
sudo snap install core; sudo snap refresh core
Remove if ready installed
sudo apt remove certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
- Obtain certificate
sudo certbot --nginx -d example.com -d www.example.com
Step 3 — Allowing HTTPS Through the Firewall
sudo ufw status
Step 5 — Verifying Certbot Auto-Renewal
sudo systemctl status snap.certbot.renew.service
sudo certbot renew --dry-run
==========================================================================================================
https://www.linuxtrainingacademy.com/install-ssl-certificate-almalinux-nginx-lets-encrypt/