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. Assign sites to a listener to serve their hostnames and shared routes. An optional default site handles unmatched hostnames.

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.

Manage listeners under Proxy → Listeners. The searchable table keeps protocol, route count, bind address, and runtime state on one row. The common Stop or Start and Edit actions remain visible; less frequent lifecycle actions are grouped under More.

On an empty database, p2pstream creates:

ListenerProtocolPort
public-httpHTTP80
public-httpsHTTPS443

Both serve one shared, published default site with a default route and static welcome target. Edit its routes under Proxy → Sites, or create a named site for your application.

Deleting a stopped listener removes its site assignments while preserving the sites and their routes. A Site with no remaining assignments serves no traffic until it is assigned again. Change any site redirects that use this listener as their HTTPS destination before deleting it.

p2pstream Proxy Listeners table showing searchable HTTP and HTTPS listeners with bind addresses, route counts, runtime state, and row actions
The compact Listeners table separates desired configuration from runtime state while keeping common runtime and edit actions on each row.
p2pstream Edit Listener drawer showing protocol, bind address, port, and enabled state
The listener drawer controls the public bind. Assign a default site for unmatched hostnames; 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.