Secure Apache with Let’s Encrypt on Ubuntu 22.04 LTS

Let’s encrypt provide valid and free ssl certiciate, Its Let’s Encrypt has the capability to automate the SSL based virtual host deployment on an Apache web server, and it also validates the domain name of the http based virtual host on the server if the http based virtual host is found So then Let’s encrypt the same HTTP virtual host and deploy a new SSL-based virtual host with the same configuration on an Apache web server.

In this post, We will optain and configure the Let’s Encrypt SSL certificate for any public domain with few commands.

Step 1: Do Nslookup

You must validate whether your domain points to your public IP address or not, as well as whether you are the owner of the domain, Execute the given command for the same.


If you have a sub-domain, you must also use nslookup to look up the sub-domain, like or 


If you can see your public IP address, we can proceed with the next steps. 

Step 2: Install Certbot

We need to update the current repository and install the certbot and python3-certbot by following the given command.

sudo apt-get update && sudo apt-get install certbot python3-certbot-apache -y

Step 3: Obtaining an SSL Certificate

We are good to obtain the Let’s encrypt valid SSL certificate by execueting given command, You need to execute the command with your domain and sub-domain named that Public IP is pointing your server.

sudo certbot --apache -d -d

You need to accept the agreement and do the following things, step by step:

  • Email Address
  • Terms and conditions 
  • News letter subscription
  • Activate HTTPS – like or

You should receive a success message, and you should also see the certification path on your machine. 


We have successfully installed Let’s encrypt SSL certificate with apache web server on ubuntu 22.04 LTS, If you still have questions, please post them in the comments section below.


Secure Apache with Let’s Encrypt on Ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top