dev-code-proxy

Reference

Configuration

These are your machine's settings. A project's own (its name, port, whether to share it) live in the project, in .dcp.json or the dcp key of the manifest it already has: Pick the name.

dcp configure [flags] writes ~/.dcp/config.json (created on first use). Flags always override the config for a single run; the file is the source of defaults, and a bare dcp runs start with it.

dcp configure --ports 3000-9000 --runtimes node,bun,python
dcp tailscale on --tailnet   # sharing settings: dcp status (Share online)

Sharing online is set with dcp status, which saves the same file and waits for the local HTTPS proxy to apply it (Share online).

Each run takes the built-in defaults, then the file, then the flags you pass, so a flag always wins for that run.

File format

{
  "ports": "3000-6000",
  "all": false,
  "runtimes": "",
  "tailscale": true,
  "private": false,
  "httpsPort": 443,
  "cloudflare": false,
  "cloudflareZone": "",
  "cloudflareHost": "{app}-{machine}",
  "bind": "127.0.0.1",
  "port": 18443,
  "interval": 20,
  "logRequests": true,
  "deregisterCycles": 5,
  "forwardHost": false,
  "matchSeparators": true,
  "docker": false,
  "acceptDns": "",
  "autoUpdate": true,
  "localRequestLog": "errors",
  "discover": true,
  "localDashboard": true,
  "localCatchAll": false
}
KeyMeaning
portsPort range ("3000-6000") or a single port ("4000") to scan
allInclude every listener, not just known web runtimes
runtimesComma-separated allow-list, e.g. "node,bun,python" (empty = all known)
tailscaleShare every dev server online through Tailscale, from the local HTTPS proxy, after reboots too (default on; dcp tailscale on|off)
privateTailscale: Serve (your tailnet only) instead of Funnel (dcp tailscale on --tailnet; --public turns it back)
httpsPortTailscale: the links' HTTPS port (Funnel: 443 / 8443 / 10000). Default 443
cloudflareShare every dev server online through a Cloudflare Tunnel (default off; dcp cloudflare on --zone …)
cloudflareZoneCloudflare: the domain the links are under, a zone in your account, e.g. example.com
cloudflareHostCloudflare: each app's hostname under the zone (default {app}-{machine}): {app} is the app's local name with dots as dashes, {machine} this machine's Tailscale or host name. One subdomain level is covered by Cloudflare's free Universal SSL; {app}.{machine} needs Advanced Certificate Manager or Total TLS
bindProxy listen address (0.0.0.0 to reach it from containers/LAN)
portThe routing proxy's HTTP port (Tailscale forwards to it); the Cloudflare tunnel's host router listens on the next one (default 18443 and 18444)
intervalRe-scan period, seconds
logRequestsLog each proxied request
deregisterCyclesConsecutive missing scans before a service is removed
forwardHostForward the public host to apps (X-Forwarded-Host/-Proto)
matchSeparatorsTreat - and _ as interchangeable in the path slug, so /module-api/ and /module_api/ both route (default on)
dockerAlso discover Docker containers via the local Docker API (read-only, over /var/run/docker.sock)
acceptDns"" leaves Tailscale DNS alone; "true"/"false" runs tailscale set --accept-dns on start
autoUpdateThe local HTTPS proxy installs new releases itself, checksum-verified, and the CLI says once a day when one is out (default on; DCP_NO_UPDATE=1 or CI turns both off)
discoverThe local HTTPS proxy finds dev servers and names them, with no dcp run (default on). Each project's own settings live in its config: Pick the name
localDashboardhttps://dcp.localhost is the dashboard: what runs, CPU, memory, requests, a Stop per app (default on; dcp configure --dashboard=false turns it off)
localCatchAllA .localhost name nothing serves gets a page listing what runs and how to start an app there (default off: no answer, as if nothing listened; dcp configure --catch-all turns it on)
localRequestLogWhat the local HTTPS proxy logs per request: "errors" (failed, 5xx, over 2 s; the default), "all" or "off" (Logs and stats)

The local HTTPS proxy reads discover, localDashboard, localCatchAll and localRequestLog as they change (within a second), the sharing settings within seconds, and ports, runtimes, all and docker on its next scan: no restart. A running dcp reads its settings when it starts; the desktop app restarts its sharing when you change one in its menu.

Host header behavior

By default dcp presents a local request to your app: Host: localhost:<port>, the /<slug>/ prefix stripped, and X-Forwarded-For preserved — so the app behaves exactly like it does on localhost (CORS, cookies, host-allowlists all match). Set forwardHost: true (or --forward-host) to surface the public host via X-Forwarded-Host + X-Forwarded-Proto: https for apps that need the public URL (OAuth callbacks, canonical links).

Slug separators

Slugs are canonically dash-separated. With matchSeparators on (the default), dcp folds _ to - when an exact route lookup misses, so /module_api_foo/ and /module-api-foo/ reach the same dev server. Set matchSeparators: false (or --match-separators=false) to route only the exact dash form.

Files

Everything dcp keeps is in ~/.dcp; dcp uninstall removes it.

PathWhat
config.jsonthe settings on this page
cloudflare.jsonwhat dcp made in Cloudflare and how it last saw it: zone, tunnel and its health, DNS records, credentials, last sync and error
secrets.jsonthe Cloudflare credentials that work (cloudflareToken, or cloudflareKey with cloudflareEmail), readable only by you; CLOUDFLARE_API_TOKEN (or CLOUDFLARE_API_KEY with CLOUDFLARE_EMAIL) in the environment overrides it
tools/cloudflared, when it is not on your PATH (downloaded and checksum-verified)
ca/the local certificate authority (ca.pem, and its key readable only by you)
routes/one file per running dcp run name
bin/the dcp releases the local proxy runs, and state.json (which one serves, which were set aside)
logs/proxy.jsonl events, stats.jsonl summaries (Logs and stats) and cloudflared.log
run/the socket a running proxy answers dcp stats on
proxy.json, update.jsonthe running proxy's address and the last release check
online.jsonwhat is shared online now, per provider (by the proxy, a terminal dcp start or the desktop app), or why it is not