How to Install Certbot on CentOS Stream 8 [Let’s Encrypt]

Updated on February 11, 2022

In 2017, we wrote an article on migrating to Let’s Encrypt from StarSSL and also you’ll see a number of articles written on Let’s Encrypt issues and solutions. Here again, we are writing how to Install the Certbot package which is a script that automatically requests certificates from LetsEncrypt. In this article, we shall show you how to install Certbot on CentOS Stream 8. By the by, when I tried to install on CentOS Stream 8, encountered the below error:

# dnf install certbot
Last metadata expiration check: 3:18:07 ago on Fri 11 Feb 2022 07:32:13 AM IST.
No match for argument: certbot
Error: Unable to find a match: certbot

How to Install Certbot on CentOS Stream 8

The Certbotpackage is not available through the package manager by default. You will need to enable the EPEL repo to install Certbot.

How to add EPEL repository to CentOS Stream 8

# dnf install epel-release -y
Last metadata expiration check: 0:00:53 ago on Fri 11 Feb 2022 10:53:21 AM IST.
Dependencies resolved.
=============================================================================================================================================================================================================================================
 Package                                                          Architecture                                          Version                                                  Repository                                             Size
=============================================================================================================================================================================================================================================
Installing:
 epel-release                                                     noarch                                                8-11.el8                                                 extras                                                 24 k
Installing weak dependencies:
 epel-next-release                                                noarch                                                8-11.el8                                                 extras                                                 11 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install  2 Packages

Total download size: 35 k
Installed size: 38 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): epel-next-release-8-11.el8.noarch.rpm                                                                                                                                                                 2.2 kB/s |  11 kB     00:05
(2/2): epel-release-8-11.el8.noarch.rpm                                                                                                                                                                      4.6 kB/s |  24 kB     00:05
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        3.3 kB/s |  35 kB     00:10
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                     1/1
  Installing       : epel-release-8-11.el8.noarch                                                                                                                                                                                        1/2
  Installing       : epel-next-release-8-11.el8.noarch                                                                                                                                                                                   2/2
  Running scriptlet: epel-next-release-8-11.el8.noarch                                                                                                                                                                                   2/2
  Verifying        : epel-next-release-8-11.el8.noarch                                                                                                                                                                                   1/2
  Verifying        : epel-release-8-11.el8.noarch                                                                                                                                                                                        2/2

Installed:
  epel-next-release-8-11.el8.noarch                                                                                       epel-release-8-11.el8.noarch

Complete!

Now you have added the EPEL repo, go on to install certbot.

# dnf install certbot -y
Extra Packages for Enterprise Linux 8 - Next - x86_64 9.6 kB/s | 159 kB 00:16
Dependencies resolved.
=============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
certbot noarch 1.22.0-1.el8 epel 54 k
Installing dependencies:
python3-acme noarch 1.22.0-1.el8 epel 96 k
python3-certbot noarch 1.22.0-1.el8 epel 426 k
python3-configargparse noarch 0.14.0-6.el8 epel 36 k
python3-distro noarch 1.4.0-2.module_el8.5.0+761+faacb0fb appstream 37 k
python3-josepy noarch 1.9.0-1.el8 epel 103 k
python3-parsedatetime noarch 2.5-1.el8 epel 79 k
python3-pip noarch 9.0.3-22.el8 appstream 20 k
python3-pyOpenSSL noarch 19.0.0-1.el8 appstream 103 k
python3-pyrfc3339 noarch 1.1-1.el8 epel 19 k
python3-requests-toolbelt noarch 0.9.1-4.el8 epel 91 k
python3-setuptools noarch 39.2.0-6.el8 baseos 163 k
python3-zope-component noarch 4.3.0-8.el8 epel 313 k
python3-zope-event noarch 4.2.0-12.el8 epel 210 k
python3-zope-interface x86_64 4.6.0-1.el8 epel 158 k
python36 x86_64 3.6.8-38.module_el8.5.0+895+a459eca8 appstream 19 k
Installing weak dependencies:
python-josepy-doc noarch 1.9.0-1.el8 epel 23 k
Enabling module streams:
python36 3.6

That’s It! Now you can run certbot to obtain the certificates from Let’s Encrypt.

Was this article helpful?

Related Articles

Leave a Comment