.env file you copied from .env.docker.example.
Variables
| Variable | Service | Required | Default | Purpose |
|---|---|---|---|---|
NEXT_PUBLIC_SOCKET_URL | client (build) | Yes | http://localhost:3001 | URL the browser uses to reach the signaling server. Inlined at build time. See the build-time URL caveat. |
PORT | server | No | 3001 | Port the signaling server listens on inside the container. The host port is set separately in docker-compose.yml. |
NODE_ENV | server | No | production | Runtime environment. Set to development to enable verbose logging. |
CLIENT_URL | server | Yes (prod) | (none) | Frontend origin allowed by CORS. Set to your client’s public URL (e.g. https://app.your-domain.com). |
TRUSTED_PROXY_COUNT | server | No | 0 | Number of trusted reverse-proxy hops in front of the server. Used for correct X-Forwarded-For parsing and per-IP rate limiting. Set to 1 if you are behind a single proxy. |
TURN_SECRET | server | No | (none) | Shared HMAC secret for coturn credentials. If empty, the server returns STUN-only and no TURN is offered. Must match coturn’s static-auth-secret. |
TURN_DOMAIN | server | No | (none) | Public hostname of your TURN server (e.g. turn.your-domain.com). Must match coturn’s realm. |
Minimal local configuration
For local testing, only one variable matters:Production configuration
A typical production.env for a deployment with HTTPS and TURN: