This post will always contain the latest version of the Plex service wrapper.
This is not official or affiliated with Plex in any way and was originally made for personal use. Treat it as such and please don’t bug the Plex devs about it. (bug them about Plex not running as a service natively by all means :P) feel free to post your questions here and I will do my best to help.
If you are having problems, the first question will be whether it runs ok when not being run as a service. Please ensure you can get Plex up and running fine on it’s own.
Please read all of this post, there is lots of information covering the most common problems (Mapped drives, different user accounts etc)
The service application was created to enable Plex Media Server to operate as a service in windows.
It has been reported to work on the following OS’s and requires .net framework 4 is installed:
- Windows Server 2003
- Windows Home Server V1
- Windows Server 2008 R2
- Windows Home Server 2011
- Windows Server 2012 R2
- Windows Server 2012 Essentials
- Windows XP
- Windows 7
- Windows 8
- Windows 8.1
- Windows 10
- Windows 11
Latest version is 1.2.3. It is open source and up on the github if you want to build it yourself: github.com/cjmurph/PmsService
For Plex Media Server 1.32.0 and above, PMSService 1.2.2 or later should be used.
For versions after 1.32, the “Open Plex” in the Plex Service Tray app takes same action as that in the Plex Media Server tray Open Plex button referenced in this forum topic New Claiming Requirement for Windows - Plex Media Server / Desktops & Laptops - Plex Forum
There is a built copy available under releases on the github here: github.com/cjmurph/PmsService/releases
To update Plex Media Server:
- Stop the plex using the service task bar application
- Run the plex installer to do the upgrade as usual.
- When the installer is complete, start Plex using the service task bar application.
UPDATE: From v1.2.3 remotely updating via the plex web interface works as expected
[WARNING] Read below if you intend to change the service account
If you change the service account type or the service user account from your current configuration, your application data (and therefore your library) will not be available when you start Plex.
If you want to run the service under a different account, Then you should first move your Plex application data folder to a common folder (Personally I have mine on a second drive of my server “D:\Plex”).
If the application data is left under the previous account’s folder, then the new account will not have permission to get to it.
Once you have the application data in a common place, edit the Windows registry according to this guide: [HowTo] An extended guide on how to move the Plex data folder on Windows
You must be logged in to the Windows user account, under which you are going to run the server, while doing this! (Actually it is also possible while logged in as Administrator, but then you’ll have to determine the Windows user ID number of the intended user account, to be able to edit the right part of the registry.)
When asked for your credentials during install make sure you fully qualify the user name.
If you are on a domain, the username is entered as domain\username.
If you aren’t on a domain, the domain is the computer itself so replace the domain name with the computer name eg. (mycomputersname\username OR .\username).
The install includes a tray application to start and stop Plex, view logs for the service and open the Plex web manager.
There is a large amount of extra information in this thread running-pms-as-a-service-in-whs which is where this application was born from.
Media location:
When Plex runs as a service, there is no user session created. Plex will run in a non-interactive session (session 0). This means that any drive mappings you have created will not be available.
If your media is located on a network device, Plex sections must be set up to look at a UNC path NOT a mapped drive.
Mapped drives – EXPERIMENTAL
From version 1.1.3 this service supports user defined drive mappings. Configure the map in settings and it will be made available before PMS is started.
You should ensure the user account the service is run under has access to the network share.
This is experimental at the moment. if you have issues, please review your logs and report back here.
Auxiliary applications:
Applications you want to have running with Plex. An example is Plexconnect, the python script for using plex with an apple TV.
I’ve added this after a request from a user to wrap Plexconnect the same way I did Plex, I figured it would work OK in the same service. I don’t use Plexconnect personally but I tested this new system with several other applications and they all ran up fine.
To add an auxiliary application, using the task bar icon, go to settings, you will get a new window. click the add button to add a new application, and the remove button to remove the currently selected one.
Name is a user friendly name for the application, file is the file to execute and arguments is any command line arguments you want to add. If you specify a URL, a menu item will be made available directly from the tray application to navigate to that address.
Save the settings and the next time the service is started the application you specified will start too. Check the logs (again through the task bar icon) to see how you got on.
I would suggest making sure that the application runs as expected in a normal user session BEFORE attempting to run it as an auxiliary application.
If you are installing Plex for the first time, I’d still recommend moving the application data folder, the user folder isn’t the best spot.
If you like the software, buy me a beer
Enjoy,
cjmurph.