Skip to content

Configuration

Variable Example Purpose
TOMO_STREAM_API_KEY generated 32-byte secret Authenticates trusted backend requests
AV_STREAM_SERVER_IMAGE tomo-av-stream-server:local Image launched for camera and desktop sessions
STREAM_SERVER_SIGNALING_URL ws://localhost:8090/signaling Signaling endpoint reachable from runtime containers

TOMO_STREAM_API_KEYS may replace the single key with a JSON map of isolated clients. Each configured key owns its own sessions.

Variable Default Purpose
PORT 8090 HTTP and signaling port
MAX_STREAM_SESSIONS 4 Maximum concurrent sessions on this worker
TOMO_STREAM_INSTANCE_ID default Ownership label used during container reconciliation

Use a unique instance ID for every control plane sharing a Docker host.

Variable Required when Purpose
PUBLIC_IP host candidates need an advertised public address Public ICE address
TURN_URL clients may be behind restrictive NAT/firewalls TURN relay URL
TURN_USERNAME TURN uses long-term credentials Relay username
TURN_PASSWORD TURN uses long-term credentials Relay password

For internet use, expose REST through HTTPS and signaling through WSS. Do not use plain ws:// outside a trusted local network.

Variable Source Typical value
CAMERA_DEVICE_HOST camera/V4L2 /dev/video0
X11_SOCKET_HOST desktop/X11 /tmp/.X11-unix
PULSE_SOCKET_HOST desktop audio /run/user/1000/pulse
INPUT_SOCKET_HOST_DIR interactive input agent /srv/tomo/input

Only mount resources used by that worker. Capture audio can be disabled per session with "captureAudio": false.

Camera and desktop sessions accept:

Field Default Accepted range/format
width 1280 320…3840
height 720 240…2160
fps 30 1…60
bitrate 2000K value such as 2000K or 4M
captureAudio true boolean
audioDevice runtime default source-specific string
inputSocketPath session-derived safe .sock path below /input

Camera adds videoDevice, which must look like /dev/video0. Desktop adds display, which must look like :0 or :0.0.