Sgjumper82 2 Posted 12 hours ago Posted 12 hours ago (edited) Emby Users, I have been searching for a way to enable Emby to run as a service, and today I found the answer. It's actually very simple. Command: Replace YourServiceName with the name of your service. (As seen below I named mine EMBY) sc create "YourServiceName" binPath= "C:\Path\To\YourApp.exe" PATH: Replace USERNAME with your username (If the default Installation folder was changed, you will need to locate the correct path) C:\Users\USERNAME\AppData\Roaming\Emby-Server\system\EmbyServer.exe CREATING THE SERVICE Run Command prompt as administrator Run these 2 commands in order. 1) sc create "Emby" binPath= "C:\Users\USERNAME\AppData\Roaming\Emby-Server\system\EmbyServer.exe" 2) sc config "Emby" start= auto Restart your computer DO NOT LOGIN Wait a few minutes after the login prompt appears and test access from another device. Edited 11 hours ago by Sgjumper82 Update service 1
RanmaCanada 578 Posted 11 hours ago Posted 11 hours ago uh pretty sure it does this by default, and has for years. There is even official documentation on this. https://emby.media/support/articles/Run-as-Windows-Service.html 1 1
Sgjumper82 2 Posted 8 hours ago Author Posted 8 hours ago @RanmaCanadaThank you for your reply, Unfortunately this is not the case. In the windows world, a service will run regardless of if a user is signed in. An app listed for startup the other hand, is user specific and won’t run until the user signs in. This article demonstrates installing and utilizing a 3rd party application to setup the service, whereas these 2 simple commands turn the Emby executable into a service utilizing inherent windows functions. Aka, No additional Application needed. A good example would be, after initial installation, Emby runs under the specific user profile, let’s say User0. If User1 is watching a movie and windows decides to perform a forced update. Emby is no longer available upon system reboot, until User0 who performed the installation signs in and the application starts. To check this: Run Startup apps on your system, and you will see that “EmbyServer” is listed. This is just for your user profile. Now run services, and see if Emby is listed.
RanmaCanada 578 Posted 6 hours ago Posted 6 hours ago (edited) 1 hour ago, Sgjumper82 said: @RanmaCanadaThank you for your reply, Unfortunately this is not the case. In the windows world, a service will run regardless of if a user is signed in. An app listed for startup the other hand, is user specific and won’t run until the user signs in. This article demonstrates installing and utilizing a 3rd party application to setup the service, whereas these 2 simple commands turn the Emby executable into a service utilizing inherent windows functions. Aka, No additional Application needed. A good example would be, after initial installation, Emby runs under the specific user profile, let’s say User0. If User1 is watching a movie and windows decides to perform a forced update. Emby is no longer available upon system reboot, until User0 who performed the installation signs in and the application starts. To check this: Run Startup apps on your system, and you will see that “EmbyServer” is listed. This is just for your user profile. Now run services, and see if Emby is listed. I've had zero issues running Emby as a service, as well as thousands of other users. If you're having problems, then it's a you problem, not Emby. Anyone using Emby server on a non dedicated machine, is asking for a really bad time. Edited 6 hours ago by RanmaCanada 1
justinrh 285 Posted 4 hours ago Posted 4 hours ago Emby doesn't run as a service OOTB, thus the KB gives a 3rd-party solution. I kinda do the same thing using the Windows 'restart apps' sign-in option, which works in most scenarios, and only the admin ever logs into the server box.
HawkXP71 116 Posted 52 minutes ago Posted 52 minutes ago All the NSSM service editor is, is a 3rd party app designer before SC was standard on all versions of windows. Its beyond ancient but in the days when the Home edition did NOT have a command line SC command to handle the services you had to use the service manager GUI. which not everyone enjoys Using SC to create the service as says, is perfectly fine and does 100% the same thing. NSSM uses the "same" win32 calls to run (I havent verified this in a while). Honestly I do think the KB should no longer use SC as noone is running a version of windows that doesnt have SC at the command line (keep the old KB around to point people to)
HawkXP71 116 Posted 50 minutes ago Posted 50 minutes ago 5 hours ago, RanmaCanada said: I've had zero issues running Emby as a service, as well as thousands of other users. If you're having problems, then it's a you problem, not Emby. Anyone using Emby server on a non dedicated machine, is asking for a really bad time. I think the only issue @Sgjumper82had with your initial comment was "uh pretty sure it does this by default" as it doesnt do it out of the box....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now