cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
640
Views
1
Helpful
2
Replies

Tales From The Crypt: Proxmox Chapter 4 - NFS

npetrele
Cisco Employee
Cisco Employee

Now that you have your Jellyfin media server installed and running (see Proxmox Chapter 3), it's time to do a little file sharing. You can share files via SMB (the Windows way) or NFS (The Unix/Linux way). Both of these work on Windows and Linux. I personally prefer NFS, so here's how to access files on your media server in Windows using NFS. 

First, create a directory on the media server where you want your shared files to exist. I added an external USB drive to my media server and mounted it at /media/video. I'm going to export that as an NFS share so I can move video files back and forth between my computers and the media server. 

Open the console to your media server and change the ownership of the directory you're going to share. In my case I used this command below (the user jellyfin and group users are created for you when you install the media server). The -R switch tells it to recurse through the directories to change the ownership. 

# chown -R jellyfin:users /media/video

Now take note of the user ID and group ID that you used. In my case, it's jellyfin and users, respectively. You can find these values with the command:

# cat /etc/passwd

Here's what I see when I execute that command:

2023-07-10_131543.png

So the jellyfin user has a user ID of 110 and a group ID of 100.

Now let's get Windows talking NFS. Go to the dialog where you turn features on and off. Check all three NFS features and click OK. You'll have to reboot to get NFS working. 

2023-07-10_123253.png

Now that you have NFS running, open a CMD window and run REGEDIT. Open this section:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default

Under Default, create a new New DWORD (32-bit) Value named AnonymousUid and assign it the user ID number in decimal (110 in our example)

Under Default, create a new New DWORD (32-bit) Value named AnonymousGid and assign it the group ID number in decimal (100 in our example)

2023-07-10_133944.png

If you can restart the NFS server, do so. The command should be "nfsadmin server stop" followed by "nfsadmin server start". At least that's what I found on the web, but it doesn't work for me. So I did the one thing Windows loves -- I rebooted. And that activated the two additional registry values specified above.

Now, all you have to do is open a CMD window and mount your NFS share as a drive. We're mounting as "anonymous" but we set the anonymous IDs in the registry, so we're actually mounting as jellyfin:users. Why must we do it this way? Because you need a user and group in order to be able to write to the NFS share, and for some odd reason, mounting the share with the username and password mount options doesn't work. The following DOES work:

C:\Users\Whoever>mount -o anon \\192.168.0.47\media\video v:

Obviously, that IP address is the address of my media server. You'll need to use the IP address of your server. 

Mounting NFS shares on Linux (and probably Mac) is a lot more straightforward, but if you need help there, let me know. 

I'll mention one more thing: I'm the paranoid type, so I don't like using cloud storage of personal information and personal notes, even if the cloud storage claims to be encrypted. So I also created a Documents directory on my media server and now store personal files there instead of in the cloud. 

2 Replies 2

davidn#
Cisco Employee
Cisco Employee

I also have all my media mounted as NFS folder from my NAS server and mounted as /media folder on my proxmox.
I then add a mount point on my JellyFin container (under Resources tab) and voila, the NFS share is available in Jellyfin.

-David

npetrele
Cisco Employee
Cisco Employee

I made the share available through the web-based admin interface:

2023-07-10_142655.png