TrueNAS: NFS Network Share

TrueNAS NFS Network ShareSetting up a TrueNAS: NFS Network Share is really handy for a lot of use cases. I have used it for both a Proxmox backup location and for location for all my Frigate NVR footage.  NFS (Network File Sharing) has been around for a long time (1980s) and has been a mainstay *nix file transfer method for decades. NFS is generally used more frequently and is usually easier than other network transfer methods in *nix operating systems. NFS shares are sometimes called Unix shares.

TrueNAS supports NFS as one of its primary file sharing protocols and it can be setup fairly easily from the TrueNAS webUI. Creating a Network File System (NFS) share on TrueNAS gives the benefit of making lots of data easily available for anyone with share access.

This is part of digiMoot’s ongoing series of TrueNAS and FreeNAS setup, configuration and install articles. This is also the second article you will need to review as part of digiMoot’s Best Security System Setup using Frigate NVR series:

  1. Best Security System Setup using Frigate NVR (Overview Article)
  2. Frigate NVR: Linux Manual Install
  3. Frigate NVR: Reolink Camera Configuration
  4. TrueNAS: NFS Network Share (this article)
  5. Frigate NVR: Home Assistant Integration

Setting Up NFS on TrueNAS

Alright, so lets get ‘er done – the first step in this TrueNAS: NFS Network Share article is to log in to the webUI of your TrueNAS server.

Click Sharing (left hand menu) -> Unix Shares (NFS). This is a list of all of the NFS shares setup on your TrueNAS server. If you haven’t set anything up, then it will, of course, be an empty list.

Let’s add a share by clicking the blue add button on the top right. Now click the “Advanced Options” button at the bottom of the page and you will be presented with page which looks something like below:

TrueNAS NFS Setup

In the top box, you will set the location (folder) which contains the data you wish to setup and share across your network via NFS. Pretty straight forward.

Now, you are probably going to want to set the ‘Maproot User’ option and/or the ‘Maproot Group’ options. What this does is that when a user or group is selected, the root user is limited to permissions of that user. For my purposes, and for the rest of this tutorial I have set this to maproot user: ‘www’ and maproot group: ‘www’. You may have different users and permissions in mind, so set this as appropriate. If you’re running into security issues later in the setup, you can always go back and test the problem by setting these to ‘root’ and ‘wheel’ respectively.

For extra security, you can set a authorized networks (e.g. 192.168.1.0) or an authorized IP address (e.g. 192.168.1.25) which will limit from where access to this share may come.

Once you’re happy with these settings, click the ‘Submit’ button in the bottom left.

Setting Appropriate Security

Now that the share is created, you need to ensure that you have setup correct file security for this share. This can be done from the Pools page (accessed by clicking ‘storage’ -> ‘pools’ from the left menu in the webUI).

On the Pools page, click the three little dots on the right hand side of the row of the dataset you wish to edit securities. This will bring up a menu for this dataset as shown in the image below.

TrueNAS NFS Security

Select edit permissions from this drop down menu. You will need to set the appropriate permission for your share on this page based on your setup. This will need to correlate to the user name / group you put in the maproot user and maproot group sections above. As noted, for me, I mapped root to www: www. As such, I made sure that the user: and group fields in the top left are set to www and www. Be sure to select the tick boxes which say ‘Apply User’ and ‘Apply Group’ to make sure that user and group changes are completed.

On the right had side, I made sure that owner@ (who based on the information in the top left) and group@ have the permissions I want to provide to the NFS share. In my case, I used ‘Basic’ permission types and allowed ‘Full Control’. You may want to assign different permissions.

Scroll down to the bottom and determine if you need to ‘Apply permissions recursively’ and ‘Apply permissions to child datasets’.

Once you’re happy with the permission (and have triple checked everything) click the ‘Save’ button at the bottom of the page.

With the permissions set, you should now be able to connect from client machines. You can follow digiMoot’s post to connect from Proxmox (upcoming post) or the Frigate NVR: Linux Manual Install in the Best Security System Setup using Frigate NVR article series to find examples of how to connect to this NFS share from a client machine.

Conclusion

Alright, that’s it! You’ve completed this TrueNAS: NFS Network Share article and should have your NFS shares available to client machines.

Happy NFSin’!

~digiMoot

Liked it? Take a second to support digiMoot on Patreon!
Become a patron at Patreon!

Leave a Reply

Your email address will not be published. Required fields are marked *