Skip to main content

Documentation 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.

The DP Code server is a Node.js HTTP and WebSocket server that serves the web UI and brokers all communication between your browser and the AI coding agents. You can run it from a pre-built binary or directly from source. By default it listens on port 3773.

Running options

Build the full monorepo first, then start the server:
bun run build
node dist/index.js
The built binary bundles the web UI alongside the server. Use this for production or remote-access deployments.

CLI flags

Every flag has a corresponding environment variable. CLI flags take precedence when both are set. See Environment variables for the full mapping.
--port
number
HTTP and WebSocket port. Defaults to 3773, or the next available port in web mode if 3773 is already in use.
--host
string
Interface to bind. Examples: 127.0.0.1 (loopback only), 0.0.0.0 (all IPv4 interfaces), a LAN IP, or a Tailnet IP. In desktop mode the default is 127.0.0.1. In web mode the default is all interfaces.
--mode
string
Runtime mode: web or desktop. Desktop mode sets loopback defaults and disables browser auto-open unless you override them.
--home-dir
string
Base directory for all DP Code data. Equivalent to T3CODE_HOME. Defaults to ~/.dpcode.
--auth-token
string
Require this token for WebSocket connections. When set, clients must pass ?token=<token> on the WebSocket URL. See Authentication.
--no-browser
boolean
Disable automatic browser opening on startup. Useful for headless or remote deployments.
--dev-url
string
URL of a running Vite dev server. The DP Code server proxies web requests to this URL instead of serving the built bundle. Equivalent to VITE_DEV_SERVER_URL.

Network binding

The server resolves the bind address in this order:
  1. --host flag
  2. T3CODE_HOST environment variable
  3. 127.0.0.1 in desktop mode, all interfaces in web mode
Before exposing the server outside localhost, always set --auth-token. See Security recommendations.

Data directory structure

All persistent state lives under the base directory (default ~/.dpcode). When --dev-url is set, data is isolated under a dev/ subdirectory instead of userdata/.
~/.dpcode/
├── userdata/
│   ├── state.sqlite          # Thread, project, and session data
│   ├── settings.json         # Server settings
│   ├── keybindings.json      # Keybinding overrides
│   ├── secrets/              # Encrypted provider credentials
│   ├── attachments/          # File attachments
│   └── logs/
│       ├── server.log        # Server process log
│       ├── provider/         # Provider event logs (opt-in)
│       └── terminals/        # Terminal session logs
└── worktrees/                # Git worktrees created by agents
Use --home-dir to move this directory, for example to isolate multiple server instances or to point at a shared network volume.

Remote access example

To accept connections from other devices on your network:
TOKEN="$(openssl rand -hex 24)"
node dist/index.js --host 0.0.0.0 --port 3773 --auth-token "$TOKEN" --no-browser
Then open http://<your-machine-ip>:3773 from any device on the same network.
For private network access without exposing a port to the internet, bind to your Tailscale IP: --host "$(tailscale ip -4)".

Build docs developers (and LLMs) love