How to Set Up SMB and NFS Shares in TrueNAS Scale

Building storage pools is only half the picture — that storage needs to actually be reachable from your other devices and servers.

TrueNAS

Building storage pools is only half the picture — that storage needs to actually be reachable from your other devices and servers. TrueNAS Scale SMB and NFS shares are the two primary methods for exposing pool storage to the rest of your network, each suited to different device types and use cases.

SMB vs NFS: Choosing the Right Protocol

  • SMB (Server Message Block) – the native file-sharing protocol for Windows, also well-supported on macOS and Linux; the natural choice for shares accessed from Windows machines or mixed-OS households
  • NFS (Network File System) – the traditional Unix/Linux file-sharing protocol, generally offering better performance and simpler permission handling specifically between Linux systems, making it the common choice for Proxmox VM storage or Linux-only environments

Many homelab setups run both simultaneously — SMB for general household file access from Windows/Mac devices, NFS specifically for server-to-server storage like Proxmox VM disks.

Creating a Dataset for Sharing

Before configuring either protocol, create a dedicated dataset within your pool specifically for the share:

  1. Go to Datasets, select your pool, and click Add Dataset.
  2. Name it appropriately (e.g., media, documents, proxmox-vms).
  3. Configure dataset-specific properties if needed (compression, quotas) separate from the pool’s overall defaults.

Setting Up an SMB Share

  1. Go to Shares → Windows Shares (SMB).
  2. Click Add.
  3. Select the dataset you created, set a share name, and configure any access restrictions.
  4. Under Advanced Options, review settings like whether to enable Recycle Bin functionality (useful for accidental deletion protection at the share level, real snapshots) and Time Machine support if serving macOS backup clients.

Configuring SMB User Access

TrueNAS Scale manages SMB access through its own user accounts, separate from any Linux system accounts:

  1. Go to Credentials → Local Users.
  2. Create a user specifically for SMB access, setting a strong password.
  3. Under the share’s Access Control List (ACL), grant this user (or a group) appropriate permissions.

Connecting to an SMB Share

From Windows:

\\your-truenas-ip\sharename

From macOS/Linux, use the equivalent SMB connection syntax through your file manager, or mount directly:

sudo mount -t cifs //your-truenas-ip/sharename /mnt/point -o username=youruser

Setting Up an NFS Share

  1. Go to Shares → Unix Shares (NFS).
  2. Click Add.
  3. Select the dataset, and configure the Authorized Networks or specific host IPs allowed to mount this share — an important security boundary, since NFS traditionally relies more on network-level trust than per-user authentication.
  4. Set appropriate permission mapping (mapping remote root access, in particular, deserves careful consideration for security).

Mounting an NFS Share from a Linux Server

Combining with the fstab guide covered earlier, add an entry for persistent, automatic mounting:

192.168.1.20:/mnt/pool/proxmox-vms  /mnt/nas-storage  nfs  defaults,_netdev  0  0

Using NFS Shares as Proxmox Storage

This is a particularly common homelab pattern: adding an NFS share as a Proxmox storage backend directly, rather than manually mounting it via fstab:

  1. In the Proxmox web interface, go to Datacenter → Storage → Add → NFS.
  2. Enter your TrueNAS system’s address and select the exported share.
  3. This storage becomes available for VM disks, backups, or ISO storage directly, benefiting from TrueNAS’s ZFS-backed reliability without needing PCIe passthrough (unlike the direct NVMe passthrough approach , which is more appropriate for dedicated storage VMs rather than sharing storage across multiple consumers on your network).

Security Considerations for Both Protocols

  • SMB – ensure strong, unique passwords for SMB-specific user accounts, and restrict share visibility/access to only the specific users or groups that genuinely need it
  • NFS – restrict authorized networks tightly rather than allowing broad network access, and pay particular attention to root squashing settings, which control whether a remote root user gets treated as root on the NFS share itself (generally, keep root squashing enabled unless you have a specific, understood reason not to)

Performance Considerations

For truly performance-sensitive use cases like Proxmox VM storage, NFS over a dedicated fast network link significantly outperforms NFS over a shared, slower network segment — worth considering if you’re using NFS shares specifically for latency-sensitive VM storage rather than general file access.

Final Thoughts

Setting up TrueNAS Scale SMB and NFS shares is what actually turns your carefully configured storage pools into really usable network storage — SMB for general household and Windows access, NFS for Linux server integration and Proxmox VM storage specifically. Understanding when to use each protocol, and configuring access controls appropriately for both, ensures your NAS storage is both accessible and properly secured across your entire homelab.

Related Posts

Comments

Leave a Reply

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