<!-- https://pkizerotohero.com/guides/lets-encrypt-ip-address-certificate/ | Markdown mirror of the HTML page | PKI Zero to Hero, by Duyutech BV -->

> Get a Let's Encrypt IP address certificate with Certbot: check public reachability, use the shortlived profile, configure NGINX and test renewal.

Source: https://pkizerotohero.com/guides/lets-encrypt-ip-address-certificate/ · Last reviewed: 2026-10-25

How-to guide · Automate renewal

# How to get a Let's Encrypt certificate for an IP address

**In one sentence:**

Issue a publicly trusted certificate for your server's IP address with Certbot, then automate renewal and verify the certificate the server actually serves.

Task

[Automate renewal](https://pkizerotohero.com/guides/#task-automate)

Platforms

- Linux
- nginx

Who it is for

- [Developer](https://pkizerotohero.com/start/#developer)
- [IT ops](https://pkizerotohero.com/start/#itops)

Level

Practitioner · 5 steps

## Before you start

- A **publicly routable IP address you control**, with inbound HTTP on port 80 and HTTPS on port 443.
- A Linux server with NGINX and Certbot 5.4 or later for the webroot workflow below.
- Permission to configure the IP’s HTTP and HTTPS virtual hosts and run automatic renewal.
- A monitoring check independent of the issuing process.

Let’s Encrypt supports certificates for both IPv4 and IPv6. Its IP certificates require the `shortlived` profile, valid for 160 hours (just over six days). That makes working renewal and deployment part of the initial setup, not an optional later improvement.

The address `203.0.113.10` below is reserved for documentation and **cannot be used to obtain a certificate**. Replace it everywhere with your own public address. A private LAN address, `localhost` or a loopback IP needs a [development certificate](https://pkizerotohero.com/guides/localhost-https-mkcert/) or [private CA](https://pkizerotohero.com/guides/private-ca-step-ca/) instead. Reverse DNS is not a requirement for an IP SAN.

## Steps

### 1. Confirm the client and the validation route

```bash
certbot --version
certbot --help all
```

Check for `--ip-address` and profile support. Follow [Certbot’s installation instructions](https://certbot.eff.org/instructions) if your distribution supplies an older version. The [Let’s Encrypt Certbot announcement](https://letsencrypt.org/2026/03/11/shorter-certs-certbot/) documents webroot issuance and the required short-lived profile.

This guide uses HTTP-01. [Let’s Encrypt’s challenge documentation](https://letsencrypt.org/docs/challenge-types/) says HTTP-01 and TLS-ALPN-01 can validate IP addresses, but DNS-01 cannot. Certbot’s webroot workflow answers HTTP-01 using your existing web server, so it does not need to take over port 80.

### 2. Serve the challenge path on the IP’s HTTP virtual host

On a dedicated origin, add this location inside the existing port 80 server block that handles requests to the IP:

```nginx
location ^~ /.well-known/acme-challenge/ {
    root /var/www/acme;
    default_type text/plain;
    try_files $uri =404;
}
```

Create the directory and a harmless reachability check:

```bash
sudo mkdir -p /var/www/acme/.well-known/acme-challenge
printf 'acme-reachable\n' | sudo tee /var/www/acme/.well-known/acme-challenge/reachability-check
sudo nginx -t
sudo systemctl reload nginx
curl --fail http://203.0.113.10/.well-known/acme-challenge/reachability-check
```

Run the last request from another network as well. It must return the test text through the actual public route. Authentication, a blanket redirect to another hostname or a default virtual host can intercept the request. A successful local curl does not prove internet reachability through a router or cloud firewall.

For IPv6 URLs, enclose the literal address in square brackets. Pass the address without brackets to Certbot’s `--ip-address` option.

### 3. Rehearse against staging without saving a test certificate

```bash
sudo certbot certonly --dry-run \
  --preferred-profile shortlived \
  --webroot --webroot-path /var/www/acme \
  --ip-address 203.0.113.10
```

Complete the account prompts with your own details. `--dry-run` uses the staging service for a test issuance and does not save the resulting certificate. Fix any [failed challenge](https://pkizerotohero.com/errors/certbot-some-challenges-failed/) before proceeding. Staging certificates are intentionally not publicly trusted; browser trust is not the success criterion for this rehearsal.

### 4. Issue and install the production certificate

Choose an unused, stable Certbot certificate name for this deployment:

```bash
sudo certbot certonly --cert-name ip-origin \
  --preferred-profile shortlived \
  --webroot --webroot-path /var/www/acme \
  --ip-address 203.0.113.10
sudo certbot certificates
```

You can repeat `--ip-address` to request additional addresses that you control and can validate. Every requested address must pass validation. Adding an IPv6 address to the certificate does not configure that address on the server.

Use the paths printed by Certbot. With the chosen name, configure the HTTPS server to use:

```nginx
server {
    listen 443 ssl default_server;
    server_name _;

    ssl_certificate /etc/letsencrypt/live/ip-origin/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ip-origin/privkey.pem;

    location / {
        return 200 "IP HTTPS works.\n";
    }
}
```

This is a minimal **dedicated IP server** example. Adapt your existing default HTTPS block instead of creating two defaults on the same address and port. An IP-literal TLS client may not send a DNS SNI name, so the default certificate for that listening address must cover the IP. Preserve your application’s actual routing and TLS policy.

Test the configuration and reload NGINX. Keep `privkey.pem` private; do not broaden permissions simply to make a diagnostic work. The [NGINX certificate guide](https://pkizerotohero.com/guides/install-certificate-nginx/) explains file placement and reload checks in more detail.

### 5. Save the reload hook and prove renewal

Issuance with `certonly` does not configure or reload the web server for you. Save a hook that reloads NGINX only after its configuration passes:

```bash
sudo certbot reconfigure --cert-name ip-origin \
  --deploy-hook "nginx -t && systemctl reload nginx"
sudo certbot renew --cert-name ip-origin --dry-run --run-deploy-hooks
systemctl list-timers --all
```

`reconfigure` tests the new renewal options before saving them. `--run-deploy-hooks` exercises the hook during the rehearsal; Certbot uses the active certificate for that hook rather than installing the untrusted staging certificate.

Confirm that your installation method actually schedules `certbot renew`. If it does not, configure renewal through that method’s documented scheduler. Do not schedule `--force-renewal` repeatedly. Set monitoring to detect both a failed renewal and a failure to deploy a newly issued certificate, with enough time to respond inside the short validity window.

## Check it worked

Check the certificate on disk:

```bash
sudo openssl x509 -in /etc/letsencrypt/live/ip-origin/cert.pem \
  -noout -dates -ext subjectAltName
curl --fail https://203.0.113.10/
openssl s_client -connect 203.0.113.10:443 \
  -verify_ip 203.0.113.10 -verify_return_error </dev/null
```

The SAN must contain an `IP Address` entry, and both network checks should validate without an exception. Repeat after a real renewal and confirm the served serial or expiry changed. A renewed file alone does not show that NGINX reloaded it.

## If something goes wrong

- **Unrecognised `--ip-address`:** update the client; `-d` is not the replacement for an IP identifier.
- **Profile or identifier rejected:** confirm the requested profile exists and that the address is eligible public address space.
- **HTTP challenge fails:** inspect the IP’s default HTTP host, port forwarding and exact challenge response.
- **Wrong certificate on HTTPS:** check the default TLS listener, not only `server_name`; IP clients differ from DNS-name clients.
- **Expires after successful issuance:** inspect the timer, renewal logs and reload hook. Do not wait for an email to prove renewal health.

## Why this works

[ACME](https://pkizerotohero.com/handbook/acme/) proves control of the address and requests a certificate containing an IP SAN. The TLS client checks that the requested IP matches that SAN and that the [chain](https://pkizerotohero.com/handbook/certificate-chains/) reaches a trusted root. Automatic renewal and server reload complete the [certificate lifecycle](https://pkizerotohero.com/handbook/certificate-lifecycle/).

## Go deeper

- [Let’s Encrypt: IP and short-lived certificate availability](https://letsencrypt.org/2026/01/15/6day-and-ip-general-availability/).
- [Let’s Encrypt: IP certificates with Certbot](https://letsencrypt.org/2026/03/11/shorter-certs-certbot/) and [profile reference](https://letsencrypt.org/docs/profiles/).
- [Certbot user guide](https://eff-certbot.readthedocs.io/en/stable/using.html): dry runs, reconfiguration, renewal and hooks.

**Early edition.** Written with AI assistance and checked against primary sources; an independent expert review is planned. Found a mistake? [Tell us](https://pkizerotohero.com/contact/?topic=content-error&page=/guides/lets-encrypt-ip-address-certificate/).

Last reviewed 25 October 2026Edition 0.9

## Keep going

### Learn why it works

- [Chapter 20: ACME and the 47-day schedule](https://pkizerotohero.com/handbook/acme/)
- [Chapter 9: Names and jobs: SANs, wildcards, key usage and the CA flag](https://pkizerotohero.com/handbook/names-and-key-usage/)
- [Chapter 19: Inventory, expiry and renewal](https://pkizerotohero.com/handbook/certificate-lifecycle/)

### Error pages

- [certbot: Some challenges have failed](https://pkizerotohero.com/errors/certbot-some-challenges-failed/)
- [NET::ERR\_CERT\_COMMON\_NAME\_INVALID](https://pkizerotohero.com/errors/chrome-err-cert-common-name-invalid/)

### Tools

- [Certificate decoder](https://pkizerotohero.com/tools/decoder/): Paste a PEM certificate and read every field in plain words.

### Topics

- [TLS and HTTPS](https://pkizerotohero.com/topics/tls/)
- [Lifecycle and automation](https://pkizerotohero.com/topics/lifecycle-and-automation/)

## More guides: Automate renewal

- [How to get and renew Let's Encrypt certificates with certbot](https://pkizerotohero.com/guides/certbot-lets-encrypt/)
- [How to automate certificates in Kubernetes with cert-manager](https://pkizerotohero.com/guides/kubernetes-cert-manager/)
- [How to automate certificates on Windows with win-acme](https://pkizerotohero.com/guides/win-acme-windows/)
- [How to get a wildcard certificate with DNS-01](https://pkizerotohero.com/guides/wildcard-dns-01/)
- [How to automate HTTPS with NGINX's native ACME module](https://pkizerotohero.com/guides/nginx-native-acme/)
