Create Plex Server as a service (Mac)

Headless server application...
On Mac, (like discused for Windows on the topic "Create Plex Server as a service (Windows)" )
It's necessary to by loged to have a working Plex Media Server...

We have nows a very good Web GUI... so...

I’d love this one… asked around for this one long ago. Never a surprise when you’re not logged in…

+1

I’ve been looking into how to do this, and I’m surprised it is not supported by Plex.

I attempted to make it work modifying the LaunchDaemons, but I get the error: FAILED TO establish the default connection to the WindowServer

My current workaround is to:

  1. Enable fast user switching on MacOS.
  2. Create a special Plex user.
  3. Set the computer to autologin to the Plex user on startup.
  4. Trigger a LaunchAgent script on login to that user that locks the account.

This mostly works, but it does mean:

  1. Added resources are used to run a whole other login instead of just the server.
  2. To shutdown or restart the machine, an admin username and password are required since multiple accounts are logged in.

2021 clean-up: duplicate