<@ULVA73B9P> I've got a prefect server running on ...
# ask-marvin
e
@Marvin I've got a prefect server running on localhost:4200, how do I start another one on localhost:4201?
m
thought for 362.1 seconds
Easiest way: run a second server on a different port. - Quick start (same config/data directory as the first server):
Copy code
prefect server start --port 4201
- Recommended for isolation (separate data dir so the two servers don’t share the same SQLite DB/state): - macOS/Linux:
Copy code
PREFECT_HOME=~/.prefect-4201 prefect server start --port 4201
- Windows PowerShell:
Copy code
$env:PREFECT_HOME="$env:USERPROFILE\.prefect-4201"; prefect server start --port 4201
Notes: - If you intentionally want both servers to point at the same backend, avoid duplicate background services by starting the second one without services:
Copy code
prefect server start --port 4201 --no-services
- You can also set host explicitly if needed:
Copy code
prefect server start --host 127.0.0.1 --port 4201
Docs for more details: - Self-hosted (Prefect Server) guide - Managing settings and profiles