`scripts/develop.sh` always binds the API server, its metrics listener, the Vite dev server and the Prometheus UI container to `0.0.0.0`. On a shared or reachable host, anyone on the network can then reach a dev instance whose admin uses the published default password, or race the first-user setup on a new database.
This adds `--bind-address` (`CODER_DEV_BIND_ADDRESS`), which takes `0.0.0.0` (the default, unchanged behavior) or `127.0.0.1`. With `127.0.0.1`, all four listeners stay on loopback and the banner lists only `localhost`. Other addresses are refused, because develop's health check, the Vite proxy and the Prometheus scrape target reach the API on `127.0.0.1`. A running `coder-prometheus` container is reused only when it listens on the same address. Otherwise develop logs a warning and runs without the Prometheus UI, because that container usually belongs to another live run.
Workspaces in Docker containers, such as the `docker` starter template's, cannot reach a loopback-bound server, because their agents connect through `host.docker.internal`. The flag description and `.claude/docs/DEV_ISOLATION.md` say so.
The `verify-coder` skill in #31782 needs this. A review of that PR found the exposure, and this PR is its prerequisite.
Verification: `go test ./scripts/develop/` passes, with tests for the flag and env binding, validation, every listen address, the Vite `--host` argument (bare by default), the banner and the Prometheus reuse check. Reverting each of those turns a test red. A live `--bind-address 127.0.0.1` run listened on `127.0.0.1` only and refused connections on the host's network IPs. golangci-lint (full and new-code) is clean. I did not run the repo git hooks locally.
---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_