TrueNAS - Custom Mounts
October 12, 2026
Last verified: October 2026 against the TrueNAS Community Edition 25.10 documentation (Init/Shutdown Scripts). See Sources.
TrueNAS does not keep manual mount commands or /etc/fstab edits across reboots. To mount NFS shares from another server (for example a Synology or another NAS) every time TrueNAS starts, run a mount script as a Post Init Init/Shutdown script. Use this when apps or tasks on TrueNAS need data that lives on another NAS.
Prerequisites
- TrueNAS Community Edition (formerly SCALE). UI paths below match 25.10.
- An NFS export on the remote server that allows this TrueNAS host to mount it.
- A pool on TrueNAS to hold the script and the mount points (
/mnt/<POOL>/...). - Admin access to the TrueNAS web UI and a shell (System > Shell or SSH).
1) Create the mount script
Store the script on a pool so it survives updates, for example /mnt/<POOL>/scripts/custom_mount.sh:
#!/bin/bash # Mount NFS exports from another NAS after TrueNAS boots. mount_nfs() { local src="$1" dst="$2" mkdir -p "$dst" mountpoint -q "$dst" || mount -t nfs "$src" "$dst" } mount_nfs <NFS_SERVER>:/<EXPORT_1> /mnt/<POOL>/<DATASET_1> mount_nfs <NFS_SERVER>:/<EXPORT_2> /mnt/<POOL>/<DATASET_2>Make it executable. The Init/Shutdown script must have the execute bit set:
chmod +x /mnt/<POOL>/scripts/custom_mount.sh2) Add it as a Post Init script
- Go to System > Advanced Settings. On the Init/Shutdown Scripts widget, click Add.
- Description: for example
Mount NFS shares. - Type: Script, then select
/mnt/<POOL>/scripts/custom_mount.sh. (Command with the script path also works.) - When: Post Init.
- Enabled: checked.
- Timeout: the default is 10 seconds. Raise it (for example to 60) if you mount several shares or the remote NAS is slow to answer.
- Click Save.
3) Verify
Run the script once by hand, or reboot TrueNAS, then check the mounts:
sudo /mnt/<POOL>/scripts/custom_mount.sh findmnt -t nfs,nfs4 df -h | grep <NFS_SERVER>Troubleshooting / notes
- Nothing is mounted after a reboot: make sure the script is executable and starts with
#!/bin/bash(otherwise it runs under dash). Then check that the remote NAS was reachable at boot and that the Timeout was long enough. - Permission denied / access denied by server: allow the TrueNAS IP in the NFS export rules on the remote NAS.
- The
mountpoint -qcheck stops the script from mounting the same share twice when you run it again by hand. - For an app that needs the data, point the app at the mounted path (
/mnt/<POOL>/<DATASET>) after the share is mounted.
