Server configuration
Environment variables for the Ceili chatserver.
Server configuration
The chatserver reads configuration from CHATSERVER_* environment variables. If a value is missing or invalid, the server uses the default shown below.
| Variable | Default | Description |
|---|---|---|
CHATSERVER_HOST | 0.0.0.0 | Address where the HTTP and WebSocket server listens. |
CHATSERVER_PORT | 8081 | TCP port for health checks, voice bootstrap, and WebSocket connections. |
CHATSERVER_WS_READ_BUFFER | 1024 | WebSocket read buffer size in bytes. |
CHATSERVER_WS_WRITE_BUFFER | 1024 | WebSocket write buffer size in bytes. |
CHATSERVER_WS_MAX_MESSAGE_BYTES | 4096 | Maximum accepted WebSocket message size. |
CHATSERVER_REPLAY_MESSAGE_LIMIT | 50 | Number of recent room messages sent on connect or room switch. |
CHATSERVER_VOICE_LOOPBACK_SENDER | true | Echoes direct voice signaling to the sender when enabled. Useful for diagnostics. |
CHATSERVER_VOICE_STUN_URLS | stun:stun.l.google.com:19302 | Comma-separated STUN URLs returned by /voice/bootstrap. |
CHATSERVER_VOICE_TURN_URL | empty | Optional TURN server URL. |
CHATSERVER_VOICE_TURN_USERNAME | empty | TURN username, used when a TURN URL is configured. |
CHATSERVER_VOICE_TURN_PASSWORD | empty | TURN credential, used when a TURN URL is configured. Keep it secret. |
CHATSERVER_VOICE_EXTERNAL_IP | empty | Public IP advertised by the voice service when the host is behind NAT. |
CHATSERVER_VOICE_UDP_PORT_MIN | 0 | Minimum voice UDP port. 0 lets the runtime choose. |
CHATSERVER_VOICE_UDP_PORT_MAX | 0 | Maximum voice UDP port. 0 lets the runtime choose. |
Local development
A minimal local configuration can use the defaults:
CHATSERVER_HOST=0.0.0.0
CHATSERVER_PORT=8081
The default STUN server is enough for development networks that permit direct traversal. Verify the server with /healthz and /readyz before connecting the client.
Public deployments
For a public deployment:
- terminate TLS at the reverse proxy and use
wss://from clients - configure a TURN server when users may be behind restrictive NATs
- set
CHATSERVER_VOICE_EXTERNAL_IPwhen the server’s public address differs from its local interface - set a bounded UDP port range and publish that range through the firewall or container
- do not expose
CHATSERVER_VOICE_TURN_PASSWORDin logs or public configuration examples
The configuration controls the current chatserver only. It does not configure the separate userserver scaffold.