<@ULVA73B9P> How I can make a deployment still wor...
# marvin-in-the-wild
p
@Marvin How I can make a deployment still work after I close the terminal Window? I'm self hosting and using SSH to been able to pass comand to the hosting machine
m
To keep your deployment running after you close your terminal window, you can "daemonize" the process. Here are a few methods you can use: ### Using
nohup
- The
nohup
command allows processes to continue running after you log out. - Example:
Copy code
bash
    nohup prefect deployment run '<YOUR_DEPLOYMENT_NAME>' &
- This will run the command in the background and keep it running after logout. ### Using
screen
- The
screen
utility allows you to create a persistent terminal session. - Steps: 1. Start a new screen session:
screen -S my_session
. 2. Run your Prefect command within the screen session. 3. Detach from the screen session by pressing
Ctrl+A
followed by
D
. 4. Re-attach to the session with
screen -r my_session
. ### Using
tmux
-
tmux
is another terminal multiplexer similar to
screen
. - Steps: 1. Start a new tmux session:
tmux new -s my_session
. 2. Run your Prefect command within the tmux session. 3. Detach from the session by pressing
Ctrl+B
followed by
D
. 4. Re-attach with
tmux attach -t my_session
. ### Resources - Daemonizing Prefect deployments - Prefect official documentation If you want integration with specific tools like
screen
or
tmux
included in Prefect workflows, it's best to consult the Prefect documentation or the community guides for any updates or best practices. Would you like to explore one specific method in more detail?