Fiko Borizqy
Fiko Borizqy

Fiko Borizqy

Install SSL Certificate on Linux Ubuntu/VPS/Nginx

Fiko Borizqy
·Jan 6, 2019·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

  1. add repository to system.
sudo add-apt-repository ppa:certbot/certbot
  1. updating apt.
sudo apt update
  1. installing certbot
sudo apt-get install python-certbot-apache
// or
sudo apt-get install python-certbot-nginx
  1. installing SSL by certbot
sudo certbot --nginx -d domainname.com -d www.domainname.com
  1. (Optional) we need to set auto renew the sertificates by crontab -e
sudo crontab -e
// and add this code deep below: (this will be executed everyday at 1 a.m.)
1 1 * * * certbot renew --post-hook "service nginx restart"

sources :

 
Share this