Skip to content

Listeners

A listener is the public TCP bind and protocol where user traffic enters p2pstream.

What It Is

Listeners belong to the public proxy runtime, not the management server. Each listener has a protocol, bind address, port, and enabled flag. Default behavior is modeled as an enabled default route for that listener.

ProtocolBehavior
HTTPPlain HTTP listener. Also serves ACME HTTP-01 challenges.
HTTPSTLS listener with SNI certificate selection. Also supports ACME TLS-ALPN-01 challenges.

When It Matters

Listeners matter when publishing apps, issuing ACME certificates, changing ports, binding only to loopback, or running behind Docker/NAT/firewall rules.

Runtime Behavior

An empty bind address means all interfaces. Ports must be between 1 and 65535.

Bind addressPortMeaning
empty80Listen on all interfaces inside the container or host.
127.0.0.18080Listen only on loopback.
192.0.2.10443Listen only on that host address.

Enabled means the listener is part of desired configuration. Running means a server socket is currently active. Disabling a listener stops its runtime. Deleting a listener requires it to be stopped or disabled first.

On an empty database, p2pstream creates:

ListenerProtocolPort
public-httpHTTP80
public-httpsHTTPS443

Both use default routes with static welcome targets until you replace those targets or add more specific routes.

p2pstream Proxy listeners section showing HTTP and HTTPS listeners with protocol, bind, port, and runtime state
The listener list separates desired configuration from runtime state, making it clear whether a public HTTP or HTTPS socket is enabled and currently running.
p2pstream listener editor showing protocol, bind address, port, and enabled state
The listener editor controls the public bind. Default handling is configured as a route; container port publishing and host firewall rules still need to expose the same port outside p2pstream.

Common Mistakes

  • Creating a listener in the UI but not publishing the container port in Compose.
  • Binding to an address that does not exist on the host/container.
  • Using HTTP-01 without a reachable HTTP listener on port 80.
  • Using TLS-ALPN-01 without a reachable HTTPS listener on port 443.

Operations documentation for self-hosted p2pstream deployments.