<@ULVA73B9P> Does prefect server generate a file w...
# marvin-ai
r
@Marvin Does prefect server generate a file with its PID? If so, what is its location?
m
thought for 62.1 seconds
Yes — if you start it in background mode. Prefect 3.x writes the server PID to:
Copy code
text
~/.prefect/server.pid
More precisely, it uses:
Copy code
text
$PREFECT_HOME/server.pid
and
PREFECT_HOME
defaults to
~/.prefect
. A few important details: -
prefect server start --background
→ creates the PID file -
prefect server start
in foreground mode → does not create the PID file - The PID filename is
server.pid
- There is also a separate
services.pid
for background server services So if you’re looking for it, check:
Copy code
text
~/.prefect/server.pid
Relevant source-verified behavior: - background startup creates the file and writes the PID -
prefect server stop
reads that file to terminate the process If you want, I can also show you the exact CLI behavior for
prefect server start/stop
and how this changes if
PREFECT_HOME
is customized.