Skip to content

Issue ACME Certificates with HTTP-01 or TLS-ALPN-01

Issue a trusted public certificate when the requested hostname reaches p2pstream on the required inbound validation port.

Use This When

Use HTTP-01 or TLS-ALPN-01 when public DNS points directly to p2pstream and inbound port 80 or 443 is available.

Prerequisites

ChallengeRequired public reachability
HTTP-01http://hostname/.well-known/acme-challenge/... reaches a p2pstream HTTP listener.
TLS-ALPN-01https://hostname:443 reaches a p2pstream HTTPS listener.

Public DNS required

The hostname must be a publicly resolvable fully-qualified domain name. localhost, bare IP addresses, and internal-only names will cause the ACME challenge to fail — the Let's Encrypt servers cannot reach them to validate ownership. Wildcards (*.example.com) also cannot use these methods; use DNS-01 instead.

Steps

  1. Open Proxy -> Listeners.

  2. For HTTP-01, ensure an HTTP listener is enabled and running on container port 80; use More -> Enable listener and Start as needed.

  3. For TLS-ALPN-01, ensure an HTTPS listener is enabled and running on container port 443; use More -> Enable listener and Start as needed.

  4. Open TLS, select Add Certificate, and create a certificate mapping:

    FieldValue
    Listenerpublic-https
    Hostname patternapp.example.com
    MethodHTTP-01 or TLS-ALPN
    CALet's Encrypt staging for testing, production when ready
    Emailyour ACME account email
    EnabledOn
    p2pstream Edit TLS Mapping drawer showing HTTP-01, Let's Encrypt staging, a hostname pattern, and HTTPS listener
    The TLS mapping drawer ties the hostname pattern to an HTTPS listener and selects the HTTP-01 or TLS-ALPN validation method and Let's Encrypt CA environment.

Verification

The certificate status should move from pending or renewing to ready.

Run:

bash
curl -I https://app.example.com

Troubleshooting

SymptomCheck
Status stays errorOpen TLS and read the mapping's Last error row.
HTTP-01 failsDNS and firewall must send port 80 to the p2pstream HTTP listener.
TLS-ALPN-01 failsDNS and firewall must send port 443 to the p2pstream HTTPS listener.
Wildcard rejectedUse DNS-01 with a Cloudflare DNS credential.

Next Steps

Operations documentation for self-hosted p2pstream deployments.