docs/myflow-localhost-runbook.md
This is the concrete setup for running ~/code/myflow with stable local domains:
http://myflow.localhosthttp://api.myflow.localhostNo random ports to remember in daily browser use.
fclang++ installed (for native domains daemon build)~/code/myflowIf your mac blocks native bind to port 80, install launchd socket mode once:
cd ~/code/flow
sudo ./tools/domainsd-cpp/install-macos-launchd.sh
f domains add myflow.localhost 127.0.0.1:3000 --replace
f domains add api.myflow.localhost 127.0.0.1:8780 --replace
f domains --engine native up
f domains --engine native doctor
f domains list
Optional default (so you can run f domains up without --engine native):
export FLOW_DOMAINS_ENGINE=native
cd ~/code/myflow
f dev
Then open:
http://myflow.localhostNotes:
f dev runs web on 127.0.0.1:3000 and API on 127.0.0.1:8780./api proxy to the local API port by default.api.myflow.localhost is useful for direct API checks, but the web app does not require it in the default f dev path.f up / f down)In ~/code/myflow/flow.toml, add:
[lifecycle]
up_task = "dev"
[lifecycle.domains]
host = "myflow.localhost"
target = "127.0.0.1:3000"
engine = "native"
remove_on_down = false
stop_proxy_on_down = false
Then use:
cd ~/code/myflow
f up
f down
f down will use task down if defined; otherwise it falls back to killing all running Flow-managed processes for the current project.
Use built-in myflow pages:
http://myflow.localhost/processes
http://myflow.localhost/logs
These pages query the local Flow daemon API (http://127.0.0.1:9050).
Native engine state is under:
~/.config/flow/local-domains/routes.json~/.config/flow/local-domains/domainsd.pid~/.config/flow/local-domains/domainsd.log~/.config/flow/local-domains/domainsd-cppQuick checks:
curl -H 'Host: myflow.localhost' http://127.0.0.1/
curl http://127.0.0.1/_flow/domains/health
tail -f ~/.config/flow/local-domains/domainsd.log
myflow.localhost refuses connectionf domains --engine native doctor
lsof -nP -iTCP:80 -sTCP:LISTEN
Then ensure f dev is running in ~/code/myflow.
myflow.localhostf domains list
f domains add myflow.localhost 127.0.0.1:3000 --replace
Invalid base URL: /api~/code/myflow (this is handled in current auth client path resolution),f dev), set an absolute API base, for example:VITE_API_URL=http://api.myflow.localhost
f domains --engine native down
For launchd-managed native mode on macOS, use:
cd ~/code/flow
sudo ./tools/domainsd-cpp/uninstall-macos-launchd.sh