Step 1: Install Certbot
sudo apt update && sudo apt install certbot python3-certbot-nginx -yStep 2: Obtain Certificate (Nginx)
sudo certbot --nginx -d example.com -d www.example.comFor Apache
sudo apt install python3-certbot-apache
sudo certbot --apache -d example.comStep 3: Test Auto-Renewal
sudo certbot renew --dry-run