Setup Free SSL - Let's Encrypt
What is Let's Encrypt
et's Encrypt is a non-profit certificate authority that provides free SSL/TLS certificates for websites.
Let's Encrypt Setup
sudo apt-get update
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install -y python-certbot-nginx
or
sudo apt-get install python3-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices) (Enter ‘c’ to
cancel): [YOUR_EMAIL] email@example.com
Agree with the terms of service.
A
- — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
(A)gree/(C)ancel: A
Allow Let’s Encrypt to send emails to your address, or not.
Y/N
- — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let’s Encrypt project and the non-profit
organization that develops Certbot? We’d like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
(Y)es/(N)o: Y
custom key: Add custom key in your nginx config
ssl_certificate /home/ubuntu/cert/fullchain.pem
ssl_certificate_key /home/ubuntu/cert/privkey.pem