This is the concrete setup for running ~/code/myflow with stable local domains:
- web UI:
http://myflow.localhost - optional API hostname:
http://api.myflow.localhost
No random ports to remember in daily browser use.
- Flow CLI available as
f clang++installed (for native domains daemon build)- myflow repo at
~/code/myflow
If your mac blocks native bind to port 80, install launchd socket mode once:
cd ~/code/flow
sudo ./tools/domainsd-cpp/install-macos-launchd.shf domains add myflow.localhost 127.0.0.1:3000 --replace
f domains add api.myflow.localhost 127.0.0.1:8780 --replacef domains --engine native up
f domains --engine native doctor
f domains listOptional default (so you can run f domains up without --engine native):
export FLOW_DOMAINS_ENGINE=nativecd ~/code/myflow
f devThen open:
http://myflow.localhost
Notes:
f devruns web on127.0.0.1:3000and API on127.0.0.1:8780.- myflow dev uses
/apiproxy to the local API port by default. api.myflow.localhostis useful for direct API checks, but the web app does not require it in the defaultf devpath.
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 = falseThen use:
cd ~/code/myflow
f up
f downf 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- process state
- start/stop actions
- live per-process logs
http://myflow.localhost/logs- focused log stream view
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-cpp
Quick 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.logmyflow.localhostrefuses connection
f domains --engine native doctor
lsof -nP -iTCP:80 -sTCP:LISTENThen ensure f dev is running in ~/code/myflow.
- Wrong app opens on
myflow.localhost
f domains list
f domains add myflow.localhost 127.0.0.1:3000 --replace- Browser console shows
Invalid base URL: /api
- update to latest
~/code/myflow(this is handled in current auth client path resolution), - hard-refresh browser cache,
- if running web manually (not via
f dev), set an absolute API base, for example:
VITE_API_URL=http://api.myflow.localhostf domains --engine native downFor launchd-managed native mode on macOS, use:
cd ~/code/flow
sudo ./tools/domainsd-cpp/uninstall-macos-launchd.sh