Victor Crespo
12/23/2025, 11:01 PMMarvin
12/23/2025, 11:01 PMMarvin
12/23/2025, 11:03 PMprefect server start binds to 127.0.0.1 (localhost only). Bind to 0.0.0.0 so it’s reachable from your network:
prefect server start --host 0.0.0.0 --port 4200
- UI will be at: http//<origin ip>4200/
- API will be at: http//<origin ip>4200/api
2) Configure the client on the other machine to point at the API
Set PREFECT_API_URL on the machine that needs to connect:
- Persist it in your Prefect profile:
prefect config set PREFECT_API_URL="http://<origin-ip>:4200/api"
- Or set it just for the current shell session:
- macOS/Linux:
export PREFECT_API_URL="http://<origin-ip>:4200/api"
- Windows (PowerShell):
$env:PREFECT_API_URL="http://<origin-ip>:4200/api"
3) Network considerations
- Open/allow inbound TCP 4200 on the origin machine’s firewall/security group
- Ensure both machines can reach each other over the network (same LAN/VPC, correct routing)
- If you plan to expose this beyond your LAN, put a reverse proxy (e.g., NGINX) in front with HTTPS and point clients to <https://your-domain/api>
Handy settings (optional)
- PREFECT_SERVER_API_HOST and PREFECT_SERVER_API_PORT control the server’s bind host/port
- PREFECT_API_URL is what clients (CLI, workers, flows) use to talk to the API
- The API base path is /api — don’t forget that suffix in the URL
Would you like help setting up a reverse proxy/TLS, or verifying connectivity from the client machine?