Install Free SSL for Linux Website

by Nian Li

Posted on January 1, 2020

Secure Socket Layer (SSL) will encrypt messages through your website (packets between users and server), which can prevent eavesdroppers getting message contents and make your website safer.

Reference: Youtube Totorial


For linux web servers, open a command window and type following commands in sequence:

  • cd ~
  • mkdir /letsencrypt
  • cd /letsencrypt
  • sudo apt-get install git
  • git clone
  • cd letsencrypt
  • ./letsencrypt-auto --help
  • ./letsencrypt-auto --apache -d -d

Last but not least, choose secure option (recommended option 2: redirect) and check your website!

command explanation
  1. return to the home directory
  2. create a folder to install letsencrypt
  3. go to the folder created
  4. install git command if have not done so
  5. clone github files under current directory
  6. go into the folder which cloned in previous step
  7. install and configure all needed stuff
  8. add SSL to your website. You can encrypt your web domain name under this server and multiple sub-domain names here. Simply use -d to divide them. Please replace "" to your own website domain name! Besides, make sure your sub-domains are the alias of your domain and port 443 (HTTPS port) has been enabled on your server.