# data-tricks-and-tips


07/27/2022, 10:37 PM
Total beginner question: When you start the 'prefect orion' server.. what do you guys use to make sure it restarts if it crashes, stays running after the terminal is closed, starts on boot etc?
👀 1

Khuyen Tran

07/27/2022, 10:42 PM
Prefect Orion server will shut down if your terminal is closed. However, you can add
to the command to run on the background such as:
Copy code
prefect orion start &
The alternative is to use Prefect Cloud, which allows you to access Prefect UI on the cloud

Cole Murray

07/28/2022, 5:51 PM
Depending on your setup, there is a few common options for running a generic service (orion server in this case) A. Systemd - You’ll create a systemd service, specify some configuration. Systemd will handle restarting the service on crash, starting it on boot, keeping logs via journalctl etc. If not running in docker, this is likely your best bet. B. Docker - Docker will do the same as above, restarting the container on crash etc. C. Cron + supervisord - Similar to systemd, you’ll use cron to start the server “@reboot /bin/supervisord”. Superivsord will handle restarts, logs etc.
👍🏻 1