How do I configure Plex Media Server to run as a Windows Service?

Would you pay for it? If it is a difficult thing to overcome in windows from a programming standpoint, then who pays for it? Plex has made the business decision that running as a service is to expensive to produce for the price to be paid. We as users have four choices: do it ourselves, pay someone to do it for us, use a different software, or put up with it. I choose the easy route, I just put up with it. Maybe when I retire, I’ll run it as a service. Or maybe by then, they’ll just run it for you in their cloud.

So as someone who has been wanting to setup my plex service as a service and running windows 10 home I will share how I was able to get it to work in hopes you all can get it to run as one.
I first downloaded the instrsrv.exe and Srvany.exe from this old forum post http://www.tacktech.com/display.cfm?ttid=197
You can also download this by searching for the windows server 2003 tool kit. I followed the windows way of doing it by setting it up according to this document Here on Microsoft help documents.

The few things I changed to this in order to get it to work was to create a user called Plex, give it permission to access the folders where I had all my files, move over the APPDATA information from my main user over to this user and then setting the service I created to log in as my Plex user and password so it has access to the network and computer resources. So far this has been working well I’ve been able to watch videos with out any issues and I was able to test run converting (optimizing) files and it uses the resources on my computer with out any issues.

The only downside I’ve run in to is when the plex server starts it opens up Python and the Plex turning service so when you tell the computer to close the app those other side apps don’t close nicely with it and you have to manually close them if you want to make changes to any of the files with ease. I hope this helps everyone let me know if you have any questions.

1 Like

My advice: replace srvany.exe with nssm.exe

2 Likes

So far it’s working well with srvany.exe but I’ll play around with nssm.exe if I run in to any issues. Thank you.

nssm.exe solves your issue with shutting down PMS.

Here a best way to auto login : simple and the password is encrypted.

2 Likes

If Emby can do it with NVENC why can’t Plex?

3 Likes

I stopped using Plex because of this problem. Far too risky to leave my central Windows computer, working as a server, logged in and connected to the internet. I will start using it again when it can be installed as a service.
I am very surprised that there are no comments from the Plex developer team. I’ll cry it out: PLEX, PLEASE ANSWER!!

2 Likes

I’d worry about a VM (of any OS) preventing the use of “Intel Quick Sync Video”, which is hardware transcoding for intel cpu’s with a gpu built in https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/

Thanks- this worked great! Can confirm that it works in Windows Server 2019!

Did you ever get an answer to this question? Have you been able to get Plex to run as a windows service?

No. And no, I am not running Plex as a service. Because of that, I am not using Plex at all.

I am not sure what your exact use case is for needing to run Plex as a service but if all your looking for is a way to ensure the media server is always up there is no need to rely on running this as a service. The easiest way to ensure your “Plex Media Server” is running at boot rather than having to login all you need to do is create a basic scheduled task to run as your primary user. Here is a GIF of the task I run on my dedicated plex server: https://i.imgur.com/upBW8ZH.gifv

5 Likes

Kileli, the only issue I found with your settings is the Dashboard applets for bandwidth, CPU and RAM don’t work when I start it this way. otherwise, seems good. thanks.

Perfect @Kileli that worked for me. The dashboard applets work, too. I just upgraded to the latest beta… perhaps that’s why?

With current Plex Pass build, the only option that worked for me was https://github.com/cjmurph/PmsService - nice UI to manage it too.

3 Likes

I installed PMS for my windows server 2016 Plex Server and it is running perfectly, albeit I have to manually push updates by RDP’ing to my Server VM desktop.

I highly recommend this add-on.

You probably already have sorted this by now, but I managed to configure this using Windows task scheduler. Now every time my PC switches on every day at 10:30, Plex will also automatically start on the sign in/login screen. Correctly set up, all your users will be able to access your Plex server without you having to sign in to Windows.

1 Like

Do you mind sharing your task scheduler configurations? Thank you!

Worked a lot better than scheduled task, thanks!