Skip to content

Instantly share code, notes, and snippets.

@gitSambhal
Created February 23, 2024 14:08
Show Gist options
  • Save gitSambhal/f6b959150a411beadd889e1e3f09bdc0 to your computer and use it in GitHub Desktop.
Save gitSambhal/f6b959150a411beadd889e1e3f09bdc0 to your computer and use it in GitHub Desktop.
Generate SSL certificate using Certbot in Ubuntu
=========================================
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
============================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment