ACME setup guide

Install an ACME SSL certificate on Apache or NGINX (Linux)

Install Certbot on Ubuntu, Debian, AlmaLinux, Rocky Linux or RHEL, request an ACME-enabled certificate with External Account Binding, let Certbot configure Apache or NGINX, and confirm automatic renewal.
  • 4 steps
  • 10 minutes
  • Auto-renews when you're done
Apache HTTP Server logoNGINX logoUbuntu logo

Platform

Apache & NGINX

ACME client
Certbot
Time needed
10 minutes
Skill level
Intermediate
Access
Root or sudo on the server
Prefer hands-off? We'll set it up
Before you start

What you'll need

  • Apache or NGINX

    Installed and serving your site on a current, supported Linux release. Outdated systems often fail to install Certbot.

  • Root or sudo access

    Every step below runs with administrative privileges.

  • DNS pointing to the server

    An A or AAAA record for each domain must resolve to this server's IP address.

  • ACME server URL + EAB credentials

    Your directory URL plus EAB key ID and HMAC key.

  1. 1

    Step 1 of 4

    Install Certbot

    Tip: Already installed? Run certbot --version to check before you start.

    Choose your Linux family, then follow one installation method. The snap package is recommended by the Certbot team because it updates itself and always ships the latest version.

    Option A — snap (recommended). Supports both Apache and NGINX:

    Terminal
    sudo snap install coresudo snap refresh coresudo snap install --classic certbotsudo ln -s /snap/bin/certbot /usr/bin/certbot

    Option B — apt. Integrates with system packages but may lag behind the latest release:

    Apache
    sudo apt updatesudo apt install certbot python3-certbot-apache
    NGINX
    sudo apt updatesudo apt install certbot python3-certbot-nginx
  2. 2

    Step 2 of 4

    Request and install the certificate

    Certbot's automatic mode gets the certificate, edits your web-server configuration and schedules renewals — all in one command. Use the line for your web server:

    Apache
    sudo certbot --apache --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 <certificate-name>
    NGINX
    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 <certificate-name>

    What each option does

    --apache / --nginx
    Which web server Certbot should configure.
    --non-interactive
    Runs without prompts, so it's safe in scripts.
    --agree-tos
    Accepts the certificate authority's subscriber terms.
    --server
    Your ACME directory URL, e.g. https://acme.sectigo.com/v2/DV.
    --email
    Where expiry and account notices are sent.
    --eab-kid / --eab-hmac-key
    The External Account Binding credentials for your subscription.
    --domain
    Each hostname to secure — repeat the flag for extra names.
    --cert-name
    A friendly label for this certificate on the server.

    A complete example for Apache securing example.com and www.example.com:

    Terminal
    sudo certbot --apache --non-interactive --agree-tos \  --email [email protected] \  --server https://acme.sectigo.com/v2/DV \  --eab-kid abc123yourEabKid \  --eab-hmac-key xyz789yourHmacKey \  --domain example.com \  --domain www.example.com \  --cert-name example-com

    Tip: Running NGINX? Change --apache to --nginx — everything else stays the same.

  3. 3

    Step 3 of 4

    Verify the certificate

    • Open https://yourdomain.com and confirm the padlock appears.
    • Check the certificate shows the right domain names and expiry date.
    • Run the domain through our free SSL Checker to confirm the full chain is served.
  4. 4

    Step 4 of 4

    Confirm automatic renewal

    Certbot installs a systemd timer or cron job that renews certificates before they expire. Do a dry run to make sure nothing will block it:

    Terminal
    sudo certbot renew --dry-runsystemctl list-timers | grep certbot

    Note: No extra configuration is needed. Certbot reloads Apache or NGINX after each successful renewal.

All set — your certificate now renews itself

Keep an eye on it anyway: scheduled jobs occasionally fail. Check your live certificate any time with our free SSL Checker.

Answers

Troubleshooting Apache & NGINX

Straight answers from our team. Still unsure? Call, WhatsApp or chat with us.
01Certbot fails to install
Update the operating system first. Very old releases miss the Python packages Certbot needs — the snap package is usually the easiest fix.
02“Unauthorized” or EAB errors
Copy the EAB key ID and HMAC key again without spaces, and confirm the --server URL matches your certificate type.
03Domain validation times out
Port 80 must be reachable from the internet. Check your firewall, cloud security group and any CDN in front of the server.
More setup guides

Installing somewhere else?

All guides

Screenshots show each platform's own admin screens; product names and logos belong to their owners and don't imply endorsement. Commands were reviewed in November 2026 — client tools change, so ask our team if a step doesn't match what you see.

Secure your site

Turn visitors into confident customers

Remove “Not secure” warnings, protect logins and payments, and show customers who you are — with free reissues and installation help.

  • Issued in minutes
  • Free reissues
  • Install help
  • M-Pesa checkout