You can configure the DP Code server entirely through environment variables — no CLI flags required. This is useful for containerised deployments, systemd units, or any environment where you manage config through aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Emanuele-web04/dpcode/llms.txt
Use this file to discover all available pages before exploring further.
.env file or secrets manager.
CLI flags always take precedence over environment variables when both are set. See Running the server for the CLI flag reference.
Variable reference
Runtime mode. Accepted values:
web or desktop. Desktop mode defaults to loopback binding (127.0.0.1) and disables browser auto-open. Equivalent CLI flag: --mode.HTTP and WebSocket port. When not set, the server uses port
3773 in desktop mode, or finds the next available port starting at 3773 in web mode. Equivalent CLI flag: --port.Interface or IP address to bind. Examples:
127.0.0.1, 0.0.0.0, a LAN IP, or a Tailnet IP. When not set, defaults to 127.0.0.1 in desktop mode and all interfaces in web mode. Equivalent CLI flag: --host.Base directory for all DP Code data (SQLite database, settings, logs, worktrees). Defaults to
~/.dpcode. Equivalent CLI flag: --home-dir.Auth token required for WebSocket connections. When set, clients must pass
?token=<value> on the WebSocket URL. Leave unset to allow all connections. Equivalent CLI flag: --auth-token.Set to
true to disable automatic browser opening on startup. Automatically true when T3CODE_MODE=desktop. Equivalent CLI flag: --no-browser.When
true, the server creates a project for the working directory at startup if one does not already exist. Defaults to true in web mode, false in desktop mode. Equivalent CLI flag: --auto-bootstrap-project-from-cwd.URL of a Vite dev server to proxy web requests to. When set, the server does not serve the built web bundle. Intended for development only. Equivalent CLI flag:
--dev-url.Set to
true to write provider NDJSON events to logs/provider/events.log. Disabled by default because it adds I/O overhead on the streaming hot path. Equivalent CLI flag: --log-provider-events.Set to
true to log outbound WebSocket push traffic server-side. Disabled by default because terminal and streaming traffic is high-volume. Equivalent CLI flag: --log-websocket-events.Precedence
When a setting is provided both as a CLI flag and as an environment variable, the CLI flag wins. The resolution order is:- CLI flag (highest priority)
- Environment variable
- Built-in default (lowest priority)
Example: minimal production environment
Example: local development isolation
Use an isolated home directory and a non-default port to run a dev instance alongside a production one:Unset
T3CODE_AUTH_TOKEN for local browser dev instances unless the web app is also configured to connect with that token. An accidentally inherited token causes the browser WebSocket to be rejected and the UI to show no threads.