You are currently viewing How to install Let’s Encrypt SSL on Apache2 Ubuntu

How to install Let’s Encrypt SSL on Apache2 Ubuntu

In this tutorial I will show you how to install SSL on Apache Ubuntu. This will work for almost any kind of Linux distribution.

Before we start, I assume you already have a domain pointed to your server and already enabled that website. You don’t ? Click here and add a website to your server.

 

First of all, connect to your server via SSH. I would personally recommend using PuTTY. On the other hand, you can connect via cmd if you are on Windows, or via terminal if you are on Mac.

After connecting to the SSH, make sure to update and upgrade all of your services by running:
  • sudo apt-get update && sudo apt-get upgrade
Later, to install Let’s encrypt SSL we will be using CertBot. If you are not using Apache on Ubuntu, please refer to their documentation and select HTTP Server and your linux distribution. Before we install certbot, please copy and paste the following commands:
  • sudo apt-get install software-properties-common
  • sudo add-apt-repository universe
  • sudo apt-get update
After adding these repositories, now we can install certbot.
  • sudo apt-get install certbot python3-certbot-apache
Now we can call our service and install SSL.
  • sudo certbot –apache
After running this command, you will be asked to select a domain you want to secure. For example I will chose number 1, which is demo.valcyber.tk

After that you will be asked if you want to redirect HTTP to HTTPS. I would personally recommend choosing the second option. It will redirect your visitors from HTTP to HTTPS.

After it will automatically install Let’s encrypt SSL and it will be automatically renewed after 3 months. How cool is that?

In conclusion, now we have installed SSL on Apache Ubuntu. You can add as many domains as you want, this SSL certificate is free.

Leave a Reply