Skip to content

Commit 40035f8

Browse files
committed
Add random port and asSystemProxy guidance for detached mode
1 parent 5be5f54 commit 40035f8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

assets/best-practices.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757

5858
- Dev Proxy can run in detached (background) mode (v2.2.0+). This is useful for CI/CD pipelines, automated testing, and agent-driven workflows where Dev Proxy needs to run without an interactive terminal.
5959
- When running in detached mode, use `--output json` to get structured, machine-readable output that can be parsed by scripts and agents.
60+
- For detached mode, especially in CI/CD or multi-instance scenarios, set `port` to `0` in the configuration file to let Dev Proxy pick a random available port. This avoids port conflicts when running multiple instances. The actual port is reported in the startup output.
61+
- Combine `port: 0` with `asSystemProxy: false` for fully isolated, non-conflicting Dev Proxy instances. This is the recommended setup for automated testing and agent-driven workflows where you don't want Dev Proxy to interfere with other traffic on the machine.
6062

6163
## Output format
6264

0 commit comments

Comments
 (0)