Skip to content

Instantly share code, notes, and snippets.

@ickarakurt
Created January 1, 2022 20:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ickarakurt/30175f54dba397d36761b50bcccc3522 to your computer and use it in GitHub Desktop.
Save ickarakurt/30175f54dba397d36761b50bcccc3522 to your computer and use it in GitHub Desktop.
Secure Nginx with Let’s Encrypt on Ubuntu

Install certbot for Ubuntu 18.04

sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-nginx

Install certbot for Ubuntu 20.04

sudo apt install certbot python3-certbot-nginx

Generate SSL Certificate

sudo certbot --nginx -d cemkarakurt.com -d www.cemkarakurt.com

Check Auto Renew Service

sudo systemctl status certbot.timer

Check Auto Renew

sudo certbot renew --dry-run

Renew Certificate

sudo certbot renew

List Installed Certificates

sudo certbot certificates

Remove Certificate

sudo certbot delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment