jellyfin-server-macos
jellyfin-server-macos copied to clipboard
Launch Server as a Service
Per user request, we should look at how to launch the server as a service on macOS, before login.
In restart/power outage situations, this would allow the server to start back up without user intervention.
It's been a long time since I've tried to look at anything related to launchd
, so this is an opportunity to start.
This still applies: https://superuser.com/questions/930389/how-to-start-a-service-using-mac-osxs-launchctl
Creating a script is rather easy. Just need to make the proper files to toss into launchd's folders. If you want Jellyfin to do more than just launch, you'd then need to compile a daemon alongside it.
Though a user can simply add it to Open at Login to accomplish what the scripts will do. Aside from needing to run the actual app bundle.
Another option entirely is to create a modern binary that plugs into macOS's new "Allow in background".