I have been reading a bunch of posts regarding running Plex as a service and have run into a snag. First some background.
Plex server is running on a W10 Hyper-V machine and it accesses the content via DFS shares. I set up a generic user account when I first started using Plex to keep signed into the machine. Of course this user has read and execute rights to the appropriate folder shares and when this user account is logged on to Plex server it works perfectly.
I have tried numerous different methods to get Plex running as a service. All have failed for me except for nssm. Plex is successfully running as a service using the 32bit version of nssm.
However, there is one big issue. I cannot get the permissions right to allow the user account I have set up in nssm to access the appropriate folders when running as a service. I have tried adding an account for the machine name Plex is running on, I have tried running the Plex nssm service with an administrator account (bad idea I know but it was just for testing) I have tried adding the Plex user account directly to the local users on the machine the shared folders are on, etc. None of these methods have worked. Which is kind of mystifying since the service is running with the Plex user account credentials, and those credentials have access to the appropriate folders, then it should work. But it doesn’t.
set up user name and password exactly the same on your file server as it is on your Plex server machine.
Pick the user name, so that it conforms to the old Windows requirements for login names – i.e. no spaces, no non-ascii characters etc. Name computers, domains, sites, and OUs - Windows Server | Microsoft Docs
you cannot use drive letters to access network file shares. The “login script” which restores the drive letters upon login is never executed with a system service.
You need to use “UNC paths” – i.e. \\servername\sharename\folder to address them from within Plex.
You can verify the success of the measures by logging in to the user account on the Plex server machine, then pasting the UNC path into the address bar of the windows file explorer and pressing Enter. This should show you instantly the contents of the file share, without asking first for access credentials.
Under normal circumstances share access is set up through group policy groups so there are no login scripts. Access to shared resources is granted automatically through group policy depending on the privileges granted to the user group the user is a member of when logging into a machine.
So if I am understanding you correctly I should set up the user account on the Plex VM as a local machine user account and not a domain user account and then of course replicate these credentials on the machine that the shares are actually located at?
Are both your file server and your Plex server based on Windows? If so, then do as you think it should be done.
My instructions were based on the assumption that the file server was running on a UNIXoid platform.
Yes. Plex server is running on a W10 VM running in HyperV on a 2012R2 server and the file server is running 2012R2. Not that it matters much, but the Plex player is a Nvidia Shield Pro.
I tried doing it as I thought it should be done. None of my ideas worked.
Now that more is known about my environment, any other ideas on how I can get this to work?
I suspect if I installed and ran the Plex server on the physical file server I would eliminate the issues with the network share credentials, but I really don’t want to do that.
I’m currently running Plex as a Server 2019 VM on ESXi 6.7 U2 w/GPU Passthrough. SMB shares mounted via GPO and hosted on a FreeNAS VM.
I ran my server as a service for awhile using cjmurph’s app, but stopped because when running in Session 0, you can’t use H/W transcoding. Considering you’re running your server as a VM, have you considered just using AutoLogon from the Windows SysInternals suite to log the user account in automatically upon boot?