Install ACME for Apache & NGINX.
PrintCertbot installation may vary depending on the operating system in use. It is important to note that Certbot requires an up-to-date operating system with support for all required dependencies and packages. Using an outdated operating system may result in installation errors or the inability to obtain an SSL certificate.
Certbot installation also requires full system access (root privileges).
Debian Family Systems
Debian OS
There are three main methods to install Certbot on Debian-based systems:
- via the apt package manager
- via snap package
- via Python (pip)
Each method has its advantages:
- apt – easy to use and system-integrated, but may provide older versions
- snap – officially recommended, provides automatic updates
- pip – suitable for advanced users and custom configurations
1. Install Certbot via apt
Update package list:
sudo apt update
Install Certbot:
For Apache:
sudo apt install certbot python3-certbot-apache
For NGINX:
sudo apt install certbot python3-certbot-nginx
2. Install Certbot via snap
Update snapd:
sudo snap install core
sudo snap refresh
Install Certbot:
sudo snap install --classic certbot
Create symbolic link:
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Red Hat Family Systems
Red Hat OS
On Red Hat-based systems, there are three main installation methods:
- dnf/yum + EPEL repository
- snap
- pip
1. Install Certbot via dnf / yum
Enable EPEL repository:
sudo dnf install epel-release
sudo yum install epel-release
Update system:
sudo dnf clean all
sudo dnf update
sudo yum clean all
sudo yum update
Install Certbot:
Apache:
sudo dnf install certbot python3-certbot-apache
sudo yum install certbot python-certbot-apache
NGINX:
sudo dnf install certbot python3-certbot-nginx
sudo yum install certbot python-certbot-nginx
2. Install Certbot via snap
Update snap core:
sudo snap install core
sudo snap refresh core
Install Certbot:
sudo snap install --classic certbot
Create symbolic link:
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Certbot Configuration
Certbot can be used in two modes:
- automatic mode – automatically configures Apache/NGINX
- manual mode – user configures the server manually
Automated SSL Certificate Installation (ACME)
Example command for automated installation using HTTP validation and ACME integration:
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>
Important parameters
- --nginx or --apache – defines web server
- --non-interactive – automation mode (CI/CD or cron)
- --agree-tos – automatically accepts terms of service
- --server – ACME directory URL (depends on provider)
- --email – email for expiration notifications
- --eab-kid and --eab-hmac-key – ACME account authentication keys
- --domain – domain for certificate
- --cert-name – certificate name in system
Sectigo ACME NGINX Example
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
Sectigo ACME Apache Example
sudo certbot --apache --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