Updated: 22 October 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

Older Certbot instructions for Ubuntu 16.04/18.04, CentOS 7 and Debian 9 used certbot-auto, which is no longer supported. Use the packaged Certbot on current systems.

Add a free SSL certificate

apt install certbot python3-certbot-nginx                     # Ubuntu / Debian
dnf install epel-release && dnf install certbot python3-certbot-nginx   # AlmaLinux / Rocky
certbot --nginx -d example.com -d www.example.com

Certbot installs a timer that renews the certificate automatically; test it with certbot renew --dry-run.

Renewal

Certificates last 90 days. The certbot.timer service renews them automatically; check with systemctl list-timers | grep certbot.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket