Certbot Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS

Certbot Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS

certbot

The Let’s Encrypt Agent for automatically obtaining and renewing TLS certificates.
Successor to `letsencrypt`.

Maintainer: Debian Let's Encrypt



Section: web

Install certbot

  • Debian apt-get install certbot Click to copy
  • Ubuntu apt-get install certbot Click to copy
  • Alpine OS apk add certbot Click to copy
  • Arch Linux pacman -S certbot Click to copy
  • Kali Linux apt-get install certbot Click to copy
  • Fedora dnf install certbot Click to copy
  • Raspbian apt-get install certbot Click to copy
  • macOS brew install certbot Click to copy

The Let's Encrypt Agent for automatically obtaining and renewing TLS certificates. Successor to `letsencrypt`.

How to use certbot?

Below are few example commands for certbot that you can use in the terminal.

Obtain a new certificate via webroot authorization, but do not install it automatically:
sudo certbot certonly --webroot --webroot-path path/to/webroot --domain subdomain.example.comClick to copy
Obtain a new certificate via nginx authorization, installing the new certificate automatically:
sudo certbot --nginx --domain subdomain.example.comClick to copy
Obtain a new certificate via apache authorization, installing the new certificate automatically:
sudo certbot --apache --domain subdomain.example.comClick to copy
Renew all Let's Encrypt certificates that expire in 30 days or less (don't forget to restart any servers that use them afterwards):
sudo certbot renewClick to copy
Simulate the obtaining of a new certificate, but don't actually save any new certificates to disk:
sudo certbot --webroot --webroot-path path/to/webroot --domain subdomain.example.com --dry-runClick to copy
Obtain an untrusted test certificate instead:
sudo certbot --webroot --webroot-path path/to/webroot --domain subdomain.example.com --test-certClick to copy
To install the latest version of certbot in your favorite operating system just copy the certbot installation command from above and paste it into terminal. It will download and install the latest version of certbot 2026 package in your OS.