Ports and run status
Every worktree gets its own dev-server port when it is created, so several branches can serve at once. Making that reliable means Strado is willing to kill things, and it is worth knowing exactly what.
Starting and stopping
The button beside the run dot at the right end of a board row starts the worktree's dev server; while it runs, the same slot offers stop.
The command is the repo's start command — or the worktree's override — run
through your login shell in the worktree's directory, with the worktree's port
in PORT and any env variables you set on the worktree.
Stopping sends SIGTERM to the whole process group, then SIGKILL five
seconds later if anything is left. The group matters: a dev server's real
listener is usually a grandchild of the shell Strado spawned.
How a port is chosen
At creation, a worktree takes the repo's default port and then walks upward until it finds one that is genuinely free — up to 200 ports above the base. A candidate is skipped if another worktree has reserved it, if it is the Strado server's own port, or if a test bind fails.
Two special cases:
- A repo pinned to a fixed port always gets that port, with no search.
- A default port below 1024 cannot be bind-tested without root, so it is trusted if no worktree has reserved it, and otherwise the search restarts from 8000.
You can change a worktree's port afterwards in its settings.
Run states
| Dot | State | Means |
|---|---|---|
| grey | idle | Never started, or never started since the server came up. |
| amber | starting | Spawned, not yet reporting. |
| green | running | Live. |
| grey | stopped | Exited cleanly, or you stopped it. |
| red | crashed | Exited non-zero. The exit code is in the tooltip. |
| blue | external | Something Strado did not start is listening on this worktree's port. |
Strado watches the output for the first http or https URL that mentions the port and keeps it as the worktree's detected URL, which is what the row's tooltip shows next to the port.
An external process gets its own kill button on the row — SIGTERM, then
SIGKILL after five seconds if it is still there.
What gets killed, and when
Heads up
Starting a dev server clears its port first. Strado stops any of its own
managed dev servers on that port, then sends SIGTERM to every other
process listening on it — its own is the one exception — including
processes it did not start. It waits up to four
seconds, polling, and SIGKILLs whatever survives. Only then does it launch.
If you keep an unrelated server on a port a worktree is configured for,
starting that worktree will end it.
There is a second, reactive eviction, because some dev servers ignore the port
they were given — a webpack dev server with SSL binds 443 regardless. When a
start exits non-zero, Strado reads the last of its output for an EADDRINUSE
naming a port. If it finds one, it evicts that port the same way and retries
the start once.
Precisely once. The retry flag is cleared only by a start you asked for, so a genuinely occupied port fails and stays failed instead of looping. The eviction note and the crash output both stay in the log, so the restart explains itself.