Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring Network Drive when Installed as a Service #54

Open
anthonylavado opened this issue Oct 18, 2021 · 4 comments
Open

Configuring Network Drive when Installed as a Service #54

anthonylavado opened this issue Oct 18, 2021 · 4 comments
Assignees

Comments

@anthonylavado
Copy link
Member

anthonylavado commented Oct 18, 2021

Brought over from the main Jellyfin repo, so it can be added to the instructions here.


Network Service (and Local System) for that matter can only access network shares or mounted drives in a Windows Domain environment. Since they identify themselves as the computer account on the network. So outside a domain the target host has no idea about the client host and can't give it access.
Your best bet is to create a new user that is named (for example Jellyfin) and use the net use and runas commands to give that user the credentials to the share. Then Jellyfin should be able to enumerate the shares.
I suppose the other option is to do full public samba shares, but that is very insecure. (It's guest access in the samba config) That should work, although I'm not 100% on that.

@EraYaN, can you perhaps give a tutorial on how to achieve this? I tried net use but I don't think I'm doing it right.

I just installed a new Windows Server 2022 VM, and was struggling with this same issue. This is how I solved it;

  1. If you don't have a dedicated (non-admin) user to access your media shares, then create one on your NAS and give it the correct permissions. Lets assume the username is JellyMedia
  2. Regardless of options during the installation of Jellyfin, in Windows create a user account with the same account name and password as you did on the NAS (so JellyMedia). For now this user must also be a member of the local Adminsitrators group for this configuration to work! :(
  3. In Windows, open Services, and locate the Jellyfin Server service. Change the log on as to the account you created in step 2. Then restart the service.
  4. When adding a library in Jellyfin, only use the Folder option, NOT the shared network folder. And you must use UNC path, not mapped drives. So for instance use \nas01\media\movies

That should do it. Now I only have to figure out what rights the service accounts needs so that it doesn't need to run as a local admin user. Right now the service throws an error 143 in the event log. The account automatically is granted the log on as a service right when adding it in step 3, so it must be something else.

Originally posted by @fthorsen76 in jellyfin/jellyfin#1836 (comment)

@anthonylavado anthonylavado changed the title Configuring Network Drive when installed as a Service Configuring Network Drive when Installed as a Service Oct 18, 2021
@anthonylavado anthonylavado self-assigned this Oct 18, 2021
@EraYaN
Copy link
Member

EraYaN commented Oct 19, 2021

The other "correct" corporate Windows Domain solution is to give the "Computer Account" access to the file share. That is how Microsoft wants you to solve it for the Network Service and system accounts.

@anthonylavado
Copy link
Member Author

@EraYaN Oops I didn't think a quote would have tagged you, but here we are. Thanks for the extra info!

@AdamLMark
Copy link

Thanks very much, @anthonylavado! Exactly what I was looking for.

@ElEmFurt
Copy link

Brought over from the main Jellyfin repo, so it can be added to the instructions here.

Network Service (and Local System) for that matter can only access network shares or mounted drives in a Windows Domain environment. Since they identify themselves as the computer account on the network. So outside a domain the target host has no idea about the client host and can't give it access.
Your best bet is to create a new user that is named (for example Jellyfin) and use the net use and runas commands to give that user the credentials to the share. Then Jellyfin should be able to enumerate the shares.
I suppose the other option is to do full public samba shares, but that is very insecure. (It's guest access in the samba config) That should work, although I'm not 100% on that.

@EraYaN, can you perhaps give a tutorial on how to achieve this? I tried net use but I don't think I'm doing it right.

I just installed a new Windows Server 2022 VM, and was struggling with this same issue. This is how I solved it;

  1. If you don't have a dedicated (non-admin) user to access your media shares, then create one on your NAS and give it the correct permissions. Lets assume the username is JellyMedia
  2. Regardless of options during the installation of Jellyfin, in Windows create a user account with the same account name and password as you did on the NAS (so JellyMedia). For now this user must also be a member of the local Adminsitrators group for this configuration to work! :(
  3. In Windows, open Services, and locate the Jellyfin Server service. Change the log on as to the account you created in step 2. Then restart the service.
  4. When adding a library in Jellyfin, only use the Folder option, NOT the shared network folder. And you must use UNC path, not mapped drives. So for instance use \nas01\media\movies

That should do it. Now I only have to figure out what rights the service accounts needs so that it doesn't need to run as a local admin user. Right now the service throws an error 143 in the event log. The account automatically is granted the log on as a service right when adding it in step 3, so it must be something else.

Originally posted by @fthorsen76 in jellyfin/jellyfin#1836 (comment)

Pt 4 worked for me, along with running the Jellyfin.Windows.Tray.exe instead of the service (possibly if I tried pt 4 with the service method it might have also worked). Thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants