I previously wrote a blog about setting up Plex Media Server as a service in Windows. However, since then I have come across a new 3rd party service manager that is, in my opinion, easier to setup and use.
[See bottom of post for an update]
You first need to download the NSSM (Non-Sucking Service Manager) exe from here. The file will be a zip file. Extract this zip file to a folder on your desktop.
Inside the extracted folder, you will see a win32 and win64 folder. If you are using Windows 32-bit then you want the nssm.exe file from the win32 folder. If you are using Windows 64-bit, you will need the nssm.exe file from the win64 folder. Copy the correct nssm.exe file for your Windows OS to C:\Windows\system32
Now, run a command prompt as Administrator. The easiest way to do this is click on start and type cmd. When you see Command Prompt appear in the search results, press CTRL + SHIFT + ENTER or right click on Command Prompt and select “Run as Administrator”.
Inside of the Administrator Command Prompt, eneter the command: nssm install
This will launch the NSSM Service Installer. You now simply need to fill out the needed fields as follows:
- On the Application tab, enter:
- For Windows 32-bit:
- Path: C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe
- Startup Directory: C:\Program Files\Plex\Plex Media Server
- For Windows 64-bit:
- Path: C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe
- Startup Directory: C:\Program Files (x86)\Plex\Plex Media Server
- For Windows 32-bit:
- On the Details tab, enter:
- Display Name: Plex Media Server (or whatever you would like the service to display as)
- Startup Type: Automatic
- On the Logon tab, enter:
- Choose “This account” radio button.
- Enter the username under which Plex should run. If you are in a domain, enter your username as: DOMAIN\Username. If you are on a standalone workstation (most likely) then enter your username as: .\Username.
- Enter your password.
- In the Service Name box, enter the desired service name. I used “PMS” for a short name with the long name as the display name.
- Click on Install Service.
- If you don’t get any errors, then you should now be able to star the Plex Media Server like a normal service.
Be sure that you have disabled the Plex Media Server startup entry so that you don’t end up with two PMS instances when you log onto the PC. Keep in mind that when an application is run as a service like this, there will be no interaction with the user desktop. This means, if you want to install updates, you will have to stop the service and run the applicaiton manually to receive the update prompt. Alternatively, you can stop the service and manually download the latest setup file and run it to upgrade Plex.
If you receive a login error or Access Denied when trying to start the service, then post a comment on here and I’ll provide additional instruction.
The above method still works just fine, even in Windows 10. However, I ended up switching to the method described here: https://forums.plex.tv/discussion/93994/pms-as-a-service using the Plex service wrapper. In addition, I also setup a Plex auto-update service as described here: http://technicallyeasy.net/update-plex-automatically-running-plex-service/
I’m not going to provide another tutorial for these setups since they are outlined pretty well on the respective links.
Hopefully one of these methods will work for you. Good luck!