# TrueNAS - Custom Mounts

<p class="callout info">**Last verified:** October 2026 against the TrueNAS Community Edition 25.10 documentation (Init/Shutdown Scripts). See Sources.</p>

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 &gt; 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`:

```bash
#!/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:

```bash
chmod +x /mnt/<POOL>/scripts/custom_mount.sh
```

### 2) Add it as a Post Init script

1. Go to **System &gt; Advanced Settings**. On the **Init/Shutdown Scripts** widget, click **Add**.
2. **Description:** for example `Mount NFS shares`.
3. **Type:** **Script**, then select `/mnt/<POOL>/scripts/custom_mount.sh`. (**Command** with the script path also works.)
4. **When:** **Post Init**.
5. **Enabled:** checked.
6. **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.
7. Click **Save**.

### 3) Verify

Run the script once by hand, or reboot TrueNAS, then check the mounts:

```bash
sudo /mnt/<POOL>/scripts/custom_mount.sh
findmnt -t nfs,nfs4
df -h | grep <NFS_SERVER>
```

Each share should be listed at its `/mnt/<POOL>/<DATASET>` path.

### 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 -q` check 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.

#### Sources

- [TrueNAS docs: Managing Init/Shutdown Scripts (25.10)](https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/)
- [TrueNAS docs: Advanced Settings Screen (25.10)](https://www.truenas.com/docs/scale/25.10/scaleuireference/systemsettings/advancedsettingsscreen/)
- [TrueNAS API: initshutdownscript.create (timeout default 10 s)](https://api.truenas.com/v25.10/api_methods_initshutdownscript.create.html)