How to install free SSL with Let’s Encrypt?

You can automatically enable HTTPS on your website with EFF’s Certbot, deploying Let’s Encrypt certificates


1. Install snapd

    Installing snap on Red Hat Enterprise Linux (RHEL) / Centos

     Adding EPEL Repo RHEL

      The EPEL repository can be added to a RHEL 8 system with the following command:

       The EPEL repository can be added to a RHEL 7 system with the following command:

$ sudo rpm -ivh


    Adding the optional and extras repositories is also recommended:

$ sudo subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"

$ sudo yum update


 Adding EPEL to CentOS

    The EPEL repository can be added to a CentOS 8   system with the following command:

$ sudo dnf install epel-release

$ sudo dnf upgrade

    The EPEL repository can be added to a CentOS 7 system with the following command:

$ sudo yum install epel-release

  Installing snapd

$ sudo yum install snapd


  Installing snap on Debian Apache on CentOS/RHEL 7

    On Debian 10 (Buster) and Debian 9 (Stretch), snap can be installed directly from the command line:

$ sudo apt update

$ sudo apt install snapd 

  Installing snap on Ubuntu

     If you’re running Ubuntu 16.04 LTS (Xenial Xerus) or later, you don’t need to do anything. Snap is already installed and ready to go.


2. Ensure that your version of snapd is up to date

     Execute the following instructions on the command line on the machine to ensure that you have the latest version of snapd.

sudo snap install core; sudo snap refresh core


3. Remove certbot-auto and any Certbot OS packages 

       If you have any Certbot packages installed using an OS package manager like apt, dnf, or yum, you should remove them before installing the Certbot snap to ensure that when you run the command certbot the snap is used rather than the installation from your OS package manager. The exact command to do this depends on your OS, but common examples are sudo apt-get remove certbot, sudo dnf remove certbot, or sudo yum remove certbot.


4. Install Certbot

    Run this command on the command line on the machine to install Certbot.

sudo snap install --classic certbot


 5. Execute the following instruction on the command line on the machine to ensure that the certbot command can be run.

sudo ln -s /snap/bin/certbot /usr/bin/certbot


 6. Run this command to get a certificate and have Certbot edit your Apache configuration automatically to serve it, turning on HTTPS access in a single step.

Make sure to add virtualhost configuration  for the domain

sudo certbot --apache


 7.  Test automatic renewal

       The Certbot packages on your system come with a cron job or systemd timer that will renew your certificates automatically before they expire. You will not need to run Certbot again, unless you change your configuration. You can test automatic renewal for your certificates by running this command:


sudo certbot renew --dry-run 


The command to renew certbot is installed in one of the following locations :



systemctl list-timers

More detailed information  can be found in  Certbot documentation
5 (1)
Article Rating (1 Votes)
Rate this article
    Attached Files
    There are no attachments for this article.
    Related Articles RSS Feed
    Can we map existing user group in ldap to ezeelogin as ezeelogin user group ?
    Viewed 4915 times since Mon, Sep 25, 2017
    How to add ssh public key for passwordless authentication in ssh
    Viewed 3871 times since Fri, Sep 1, 2017
    How to enable google 2FA (Two factor Authentication) in ezeelogin ?
    Viewed 5871 times since Mon, Oct 9, 2017
    Integrate Red Hat IDM in Ezeelogin jump server
    Viewed 380 times since Thu, Jan 14, 2021
    Add a server using ssh key pair in ezeelogin
    Viewed 1861 times since Fri, Mar 22, 2019
    How to pass environment variable through jump server?
    Viewed 1807 times since Tue, Jul 17, 2018
    How do i configure Ezeelogin to authenticate using OpenLdap or Window AD server?
    Viewed 4072 times since Wed, Jan 24, 2018
    How can i reset the default global key ?
    Viewed 1367 times since Fri, Jun 8, 2018
    How can i reset password / security code ?
    Viewed 3250 times since Wed, Oct 18, 2017
    Configure Ezeelogin to authenticate using Windows_AD / OpenLDAP (Pam-Ldap) in Debian?
    Viewed 247 times since Fri, Dec 4, 2020