I would like to have Plex Media Server start up as a Windows 10 Service when my PC boots up rather than my having to log into Windows before Plex Media Server can start up. This means anyone in my household can turn on my PC and proceed to access my Plex Media without my having to be there to log in (or may having to give members of my household log in access to my PC.
How do you configure PMS to “run as a service”?
Auto logon/lock method
Verified to work on windows server 2016 (Desktop Experience)
Setup Plex to run at logon
- Start Plex
- Open system tray
- Right-click the Plex icon
- Check start Plex Media Server at login
Setup auto-login
- Open Start menu/Search
- Search for and open regedit
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/Window NT/CurrentVersion/Winlogon
- Create or edit DefaultUserName (string) and set it to your username to run plex under
- Create or edit DefaultPassword (string) and set it to the password for the default user
- Create or edit AutoAdminLogon (string) and set it to 1
- Reboot to test if the auto login is working
Auto locking after login
- Open notepad as administrator
- Copy: rundll32.exe user32.dll,LockWorkStation
- Save as /Program Files/lock.bat (change file type to all files)
- Open group policy editor by searching for gpedit
- Navigate to Uesr Configuration/Windows Settings/Scripts (Log on/Log off)
- Double click Logon then click add
- Brows for the script located at /Program Files/lock.bat and click ok
- Reboot to test that the computer locks after logon
Hi Jake
The username and password is stored in cleartext, which is quite a security risk. You can do this another way on Windows Server 2016:
https://serverfault.com/questions/840557/auto-login-a-user-at-boot-on-windows-server-2016
“killercowuk” writes this:
To set auto-login account
Start > Run > netplwiz (as explained in other answers)
Un-tick “Users must enter a user name and password to use this computer.”
Provide login credentials to be used for auto-logon
Disabling CTRL+ALT+DEL logon requirement
Start
Type ‘Local Security Policy’ (no quotes) and click on item matching this name
Open ‘Local Policies’
Open ‘Security Options’
Locate Policy called ‘Interactive logon: Do not require CTRL+ALT+DEL’
Double click on it
Set to ‘Enabled’
I can confirm this is working on Windows Server 2016, and now the password isn’t stored in cleartext 
Just download Microsoft auto-login file from below link !
Autologon for Windows
My solution to this; Plex now runs as a service in an Ubuntu Linux VM that automatically starts up with the computer. (Win 10 Pro).
Hello,
What is the reasoning for not implementing windows awevice functionality in Plex? I have no doubt that that team are capable of creating this functionality. A product called Plex Media Server should, in my opinion, be able to run as a Service.
I stream plex to multiple devices. Having to log into the server is a security risk and an inefficiency that should be avoided. People who want to use PMS on the same machine could have a front end to the service. The same overall functionaltiy would be provided.
I am sure that on the Windows platform Plex has the data to know how their clients (esp Plex Pass subscribers) use the product. It would be interesting if this data is published.
Cheers,
Chris
You could use NSSM and setup a service that way, that works for me
Unfortunately no.
Hardware video transcoding doesn’t work fully, if you run a software as system service.
(i.e. the decoding of files in hardware doesn’t work).
This is a restriction in Windows and is not easily overcome.
This is amazing! The fact that you did this and the Plex team didn’t should speak volumes on your initiative and their lack of it! Why dont they have this already??? Well done!
It seems like there are several repeating limitations that Plex has… Low volume being a major one that even the most basic video players have mastered… So why would they make anything such as a service that can actually perform transcoding be any less difficult? Its like they don’t want to (or simply are unable to) “overcome” these problems that others already have done (volume normalization in particular)… Lets not set the bar too high for these good people… snickers
My thoughts were aligned with yours but I did not comment because my level of expertise is not in this area.
I use products such as BlueIris (camera surveillance software) that works as a service and manages different brands of cameras. I use products such as Syncovery that works as a service and interfaces with different hardware. There are others. Both these products have a front end and a back end (the service) and they work flawlessly.
In my opinion if there are situations in which certain hardware (because it lacks the proper drivers???) does not play nice with a service Plex would alert the user of the fact and allow people to choose. In my case I use PMS to hold media that I will stream to other devices. I have no hardware to transcode. I believe that there are many people like me who would benefit from a true server setup.
A friend has informed me that having a server in a logged in state weakens the security of the machine when compared to a machine in a unlogged state.
This goes against the vein of security by design. It might be a media server but I think providing the most thorough security possible should be paramount.
Except that if you log in, start the service, then lock the server, it’s _essentially_as secure as if it wasn’t logged in.
That is not my understanding. Locked is more secure. And in a shared environment it is more efficient.
A server (or any PC) logged in interactively is highly vulnerable to a “Pass the hash” attack, whereby an attacker is able to effectively clone the logged in account credentials and re-use them. This is much harder when the user is running as a service (smaller attack service) and much much harder if the user isn’t logged in at all. If using “autologin” on a computer, the account should be ‘least priviledge’ - ie. definitely no admin privileges, and in an ideal world restricted to only running the app itself - in this instance the plex server. “As-a-service” tends to achieve this a lot more gracefully than having to kludge around on the desktop, however it is harder for a developer to implement transparently, as calling certain other OS functions will require the account the service is running under to have the relevant permissions. So your friend is right - leaving an interactive user logged in to run a service is not good practice - especially in a domain environment where the hash can be stolen and used elsewhere. If the account has any kind of admin privilege, then it is to be avoided at all costs.
When I purchased the Plex Lifetime Pass I did so because of the recommendation by a fellow developer. My mistake was that I didn’t test it first in which case I would immediately notice this glaring deficiency and most likely would not purchase Plex at all. Now I’m stuck with the software I invested in and like for the most part but it has this unacceptable flaw where you have to be logged on to run the service which is a serious security risk and it appears the team has no intention of addressing this issue at all… very disappointing.
I agree, this should be an option. Howevery, you can create your own service or you could start PlexMediaServer “at system startup” through Task Scheduler.
Sadly, i too purchased a lifetime pass and just now see the issue. I have Plex running on a Server 2019 essentials, A problem in so many ways, I am sure someone will eventually work it out.
I find it hard to believe this. I do have a limited understanding of writing services and their interaction with the windows core or Hardware lair. However Milestone Xprotect Essentials+ Recording Server Accomplishes exactly this task. It transcodes the stream of my two 4K cameras. After booting the server, before I login, the cameras are being recorded to disk. Furthermore via the mobile application i can view the live streams or playback older footage. The system actively transcodes my streams to the desired resolution and bitrate depending on my network conditions, device requirements or desired specifications. I do not believe my mobile device is actually doing the transcoding if that were the case you would have to have some pretty hefty device specs.
If Milestone Xprotect can accomplish this. Then it is not impossible to accomplish for Plex Media Service. Considering this is a paid subscription service with a large active community, I would expect the development team to see the value in developing a solution here.
Forcing Plex users to login and leave their systems in a logged-in-locked State presents greater security risks than running atleast part of the application as a service that can effectively deliver the expected performance from a logged out state is the same thing as saying Plex is creating a security vulnerability.
Plex is different from other programs that require constant direct user input. When I am finished using those types of programs because I am security-minded I logged off my server rather than simply locking my work station.
Plex is a program I expected to operate in the background with little to no user input other than that from remote devices. If the program cannot perform from a logged off state then Plex media server is not effectively accomplishing the task that myself and others are paying for.
As a long time Plex subscription member. I would like to humbly ask that the Plex development team please make a fix for this issue!
Perhaps if a Plex representative would reply to this discussion and directly acknowledge this issue by commenting on what if anything Plex R&D Team plans to do about this issue. We could all rest easier knowing for certain if a fix is in the works or not. Thereby making the decision on whether or not to attempt to solve this on our own is even necessary.