Table of Contents
Quick Answer: Install Certbot on your server, then run one command with your ACME directory URL and the EAB credentials from your order. Certbot validates your domain and installs the certificate in Apache or NGINX.
Installing Certbot for ACME SSL Setup may vary depending on the operating system and server environment you are using. Before you install Certbot, make sure your operating system (OS) is up to date and supports all the required dependencies and packages. Using an outdated or unsupported operating system can cause installation errors, compatibility issues, or problems when obtaining and renewing an SSL certificate. An ACME certificate order: It gives you the ACME directory URL, the EAB key ID and the EAB HMAC key.
It is also important to note that installing Certbot requires root access or full administrative access to the operating system.

How Do You Install Certbot on Debian or Ubuntu?
On Dabian and Ubantu you can install Certbot in three ways: with Apt, with Snap or Python with pip.
You can use apt, snap, or Python with pip. Apt fits the system but may give an older version. Snap is recommended by the Certbot instructions and updates itself. Pip suits advanced users who need an isolated setup.
Each option suits a different kind of setup. Apt is the simplest option. It’s built into the system and easy to manage, but the packaged version may lag behind the latest Certbot release. Snap, the method recommended by the Certbot developers. It keeps Certbot up to date automatically, so you always run the latest version. The best method for advanced users is pip. It’s useful when you need Certbot in an isolated Python environment or a custom configuration.
Option 1: Debian or Ubuntu with apt
First, update the package lists:
sudo apt update
Then install Certbot with the plugin for your web server. For Apache:
sudo apt install certbot python3-certbot-nginx
For Nginx:
sudo apt install certbot python3-certbot-apache
Option 2: Any distribution with snap (recommended)
The Certbot developers recommend snap because it keeps Certbot updated automatically.
Make sure snapd’s core is current:
sudo snap install
sudo snap refresh
Install Certbot:
sudo snap install --classic certbot
Then create a symbolic link so the certbot command is available system-wide:
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Red Hat OS
On Red Hat-based systems such as RHEL, Rocky Linux, AlmaLinux, and CentOS, you can install Certbot in three ways: with dnf (or yum), with snap, or with pip.
Each option suits a different kind of setup:
- dnf/yum: Certbot comes from the EPEL repository, so you enable EPEL first, then install Certbot like any other system package. It’s easy to manage, but the version may lag behind the latest release. Newer systems use dnf, and older ones use yum.
- snap: The method the Certbot developers recommend. Once snapd is set up, Certbot updates itself automatically.
- pip: Best for advanced users who need Certbot in an isolated Python environment or a custom configuration.
(i) Installing Certbot with dnf or yum
Enable the EPEL repository
sudo dnf install epel-release
OR
sudo yum install epel-release
Refresh the repository cache
sudo dnf clean all
sudo dnf update
OR
sudo yum clean all
sudo yum update
Install Certbot and your web server plugin
Apache:
sudo dnf install certbot python3-certbot-apache
OR
sudo yum install certbot python-certbot-apache
NGINX:
sudo dnf install certbot python3-certbot-nginx
OR
sudo yum install certbot python-certbot-nginx
(ii) Installing Certbot with snap
This is the method the Certbot developers recommend, because snap keeps Certbot updated automatically.
Make sure snap’s core is up to date
sudo snap install core
sudo snap refresh core
Install Certbot
sudo snap install --classic certbot
Create a symbolic link
sudo ln -s /snap/bin/certbot /usr/bin/certbot
This makes the certbot command available system-wide, so you can run it from anywhere.
Whichever method you chose, confirm the installation:
certbot --version
Certbot Configuration
Certbot works in two modes. In automatic mode, it obtains the certificate and also configures your web server (NGINX or Apache) for you. In manual mode, it only obtains the certificate, and you make the web server settings yourself.
Automatic Installation of the Certificate
The example below installs and validates a certificate using the HTTP validation method. Certbot finds the directory of your website on its own and creates the files needed for validation.
sudo certbot --nginx --non-interactive --agree-tos --server <acme-directory> --email <your-email> --eab-kid <your-eab-kid> --eab-hmac-key <your-hmac-key> --domain <your-domain> --cert-name <your-certificate-name>
--nginxor--apacheselects the web server where the certificate will be installed.--non-interactiveturns off prompts, so the command can run in CI/CD pipelines and cron scripts.--agree-tosaccepts the terms of service automatically.--serveris the ACME directory URL. It is provided when you buy the certificate and differs by vendor and product.--emailis the address that receives notices when the certificate is about to expire.--eab-kidand--eab-hmac-keyare the identification keys issued with your ACME account.--domainsets the domain or domains the certificate is issued for. Repeat it for each name.--cert-namesets a name that identifies the certificate in the system.
Example Command for NGINX Using the Sectigo Server
sudo certbot --nginx --non-interactive --agree-tos --email admin@example.com --server https://acme.sectigo.com/v2/DV --eab-kid <your-eab-kid> --eab-hmac-key <your-hmac-key> --domain example.com --domain www.example.com --domain api.example.com --cert-name my-example-certificate
Example Command for Apache
To install the certificate on Apache, change --nginx to --apache.
sudo certbot –apache –non-interactive –agree-tos –email admin@example.com –server https://acme.sectigo.com/v2/DV –eab-kid –eab-hmac-key –domain example.com –domain www.example.com –domain api.example.com –cert-name my-example-certificate
