Skip to content

Mesh relay

Configuration

Configure the relay through the command-line arguments supported by the Docker entrypoint.

The image builds /data/config.json from its command-line arguments every time the container starts. Treat the container arguments as the source of truth: manual changes to config.json are overwritten on restart.

Environment variables such as RELAY_PORT, LOG_LEVEL and MAX_CONNECTIONS are not supported.

Supported operator arguments

ArgumentDefaultPurpose
--host0.0.0.0Public IPv4 address or DNS name advertised to other relays. Set this explicitly for a public relay.
--external-port41234Public TCP and UDP port advertised with --host. It must match the Docker host port mapped to internal port 41234.
--originsEmptyComma-separated origin relays in host:port format. Use 88.186.133.102:12000,88.186.133.102:12001 for the public network.

Unknown arguments are ignored by the current entrypoint. IPv6 literals are not accepted because relay addresses currently use the host:port format.

Fixed container settings

The current image fixes several settings rather than exposing them as operator options:

SettingValue
Client and relay port41234
Message database/data/relay.db
Heartbeat interval60 seconds
Unseen relay cleanup interval60 minutes
Maximum rebound count7
Client transportTCP
Relay-to-relay transportUDP

The container always listens internally on 41234. If the Docker host publishes another port, map that port to 41234 for both protocols and pass the host port through --external-port.

Origins

An origin gives a new relay an initial peer from which it can discover the network. For the public network, configure both documented origins.

Persistent data

Everything under /data must survive container replacement. Losing the volume loses stored envelopes, databases and local relay state. See Operations for a backup procedure.