Ed Hartley
09/16/2025, 12:31 PMMarvin
09/16/2025, 12:31 PMMarvin
09/16/2025, 12:35 PMprefect server start --host 127.0.0.1 --port 4200
Then open http://127.0.0.1:4200 and the UI should connect to http://127.0.0.1:4200/api.
- If you need remote access from another machine on your network:
1) Find your machine’s IP (e.g., 192.168.x.y)
2)
prefect server start --host 192.168.x.y --port 4200
3) Access the UI at http://192.168.x.y:4200 from the other machine
Sanity checks
- Health endpoint from the same machine:
curl <http://127.0.0.1:4200/api/health>
You should see a healthy response.
- Make sure you’re actually visiting the UI at http://127.0.0.1:4200 (or your chosen host), not http://0.0.0.0:4200.
A couple of clarifying questions (to ensure we land the right config)
- How are you starting the server? e.g., just prefect server start
, or with custom flags, or via Docker?
- Are you accessing the UI from the same machine running the server, or from another device?
References
- Self-hosted server docs: Prefect 3.x: Self-hosted
- Managing settings: Prefect 3.x: Manage settings
If you share the exact command you used to start the server (and whether you’re local vs remote), I can tailor the exact flags/env vars.Ed Hartley
09/16/2025, 12:40 PMMarvin
09/16/2025, 12:40 PMMarvin
09/16/2025, 12:42 PMdocker run --rm -p 4200:4200 \
-e PREFECT_UI_API_URL=/api \
prefecthq/prefect:3-latest \
prefect server start --host 0.0.0.0 --port 4200
- docker-compose
services:
prefect:
image: prefecthq/prefect:3-latest
command: prefect server start --host 0.0.0.0 --port 4200
environment:
- PREFECT_UI_API_URL=/api
ports:
- "4200:4200"
Then open http://localhost:4200 and the UI should connect to /api (same origin), which maps to the API inside the container.
Notes
- Your local PREFECT_API_URL= http://127.0.0.1:4200/api is for CLI/clients on your host. It doesn’t control what the UI uses inside the container. The UI uses PREFECT_UI_API_URL.
- If you prefer an absolute URL instead of same-origin, set PREFECT_UI_API_URL=<http://localhost:4200/api>
.
- After changing the container env, hard refresh the browser in case anything was cached.
Quick health check
curl <http://localhost:4200/api/health>
You should get a healthy response.
Docs
- Self-hosted server: Prefect 3.x: Self-hosted
- Manage settings: Prefect 3.x: Manage settings
If you can share your current docker run or compose snippet, I’ll sanity-check it for you.