chase albright
12/02/2025, 2:29 PMMarvin
12/02/2025, 2:29 PMMarvin
12/02/2025, 2:35 PMcurl -s http://<hostA>:4200/ui-settings
curl -s http://<hostB>:4200/ui-settings
The api_url values should point to their own host:port (and be different from each other).
- On each VM, confirm the effective setting:
prefect config view --show-sources | grep PREFECT_UI_API_URL
If this isn’t set, the server derives it and you can end up with an unexpected or shared value.
How to fix
- Explicitly set a unique PREFECT_UI_API_URL for each instance (to itself), then restart the server:
# On VM A
export PREFECT_UI_API_URL="http://<hostA>:4200/api"
prefect server start
# On VM B
export PREFECT_UI_API_URL="http://<hostB>:4200/api"
prefect server start
You can also set PREFECT_SERVER_API_HOST/PORT if needed, but PREFECT_UI_API_URL is the critical one for the UI.
- After restarting, re-check:
curl -s http://<hostA>:4200/ui-settings
curl -s http://<hostB>:4200/ui-settings
Ensure each api_url reflects its own host.
- In your browser, hard refresh both origins and clear site data for each host:port to avoid cached API targets (localStorage/cache).
If you’re behind a reverse proxy
- If both instances sit behind the same hostname, give them different subdomains or distinct paths and configure accordingly:
- Different domains:
- Instance A: set PREFECT_UI_API_URL="https://dash-a.example.com/api"
- Instance B: set PREFECT_UI_API_URL="https://dash-b.example.com/api"
- Different paths:
- Proxy /a/ → server A, /b/ → server B
- Then set on A: PREFECT_UI_SERVE_BASE="/a/" and PREFECT_UI_API_URL="/a/api"
- On B: PREFECT_UI_SERVE_BASE="/b/" and PREFECT_UI_API_URL="/b/api"
Useful commands (verified)
- View current settings:
prefect config view --show-sources
- Start the server:
prefect server start --help
If you can share how you’re accessing each (exact URLs/hostnames) and the outputs of the two /ui-settings calls, I can confirm the exact tweak needed.chase albright
12/02/2025, 2:45 PM