Run as a system service
You can optionally setup Owncast to run under systemd so it’s a managed service on your machine that automatically starts when your machine does.
A full example can be found here.
This is where the “functional” parts of the service live.
[Service] Type=simple WorkingDirectory=[path_to_owncast_root_directory] ExecStart=[path_to_owncast_executable] Restart=on-failure RestartSec=5
WorkingDirectory should be where you want the owncast folder to live.
ExecStart is the actual owncast binary.
Just create the file in your systemd configuration directory (typically /etc/systemd/system/), and update the systemd daemon with:
sudo systemctl daemon-reload