I am running PMS on a M2 macMini 8GB (usually headless). PMS starts when the specific user (lets call it “server”) logs in, so this is working.
Now I a have to use, at the moment, the macMini for work with a monitor attached, and for certain applications (keyboard and mouse sharing) it is necessary that no other user is logged in apart from my account.
Is it possible to run PMS as a system service on macOS, which starts when the system starts, i.e. that no user needs to be logged in? It should not be to difficult to install it as a daemon using launchcontrol, but I have at the moment not the k now ledge how. Furthermore: are there any pitfalls? Or doesn’t it work?
My Plex server has been known to quit abruptly, which I wouldn’t necessarily know about until much later if I wanted to watch something or one of my friends was trying to watch something and messaged me that it was down. (…) So I decided to create a LaunchDaemon that will launch Plex at boot and then keep it running at all times, whether I am logged into my account, logged out, whatever, except if I specifically quit it manually, in which case it stays down until reopened. It does this by polling the Plex status any time a volume is mounted or unmounted or if path to the external drive becomes empty.
All one needs to do is drop the file com.plexapp.plexmediaserver.plist into /Library/LaunchDaemons/ folder. I believe since the Disabled flag is set to “No” it should just begin running immediately.