The Premise
At the time of this writing StartOS doesn’t support multiple data drives. This can make it difficult to store large amounts of data like a media library which you would like to expose with Jellyfin for example. This guide aims to provide a way for users to leverage filebrowser-startos with an external (but perhaps low CPU) NAS to expand the storage capabilities of StartOS.
WARNING: Once an external share has been mounted to Filebrowser, caution should be exercised when creating a Filebrowser backup as all service data including the mounted NFS share will be encrypted and saved to the backup target. If data other than the mounted NFS share exists on Filebrowser that needs to be backed up, you might want to unmount the NFS share before backing up Filebrowser.
The Process
This guide assumes you already have NAS exposed on your LAN using NFS. Perfect Media Server has a great guide for setting up a home media server to accomplish the steps not covered in this guide, while leveraging the usability of StartOS.
-
SSH into your StartOS server and elevate to root privileges with
sudo -i
-
Create a mountpoint for your NAS in Filebrowser i.e.
mkdir /embassy-data/package-data/volumes/filebrowser/data/main/data/NAS/
-
Create a postinit.sh script to mount the NFS share on each reboot of StartOS by running
touch /media/embassy/config/postinit.sh
-
Make the script executable by running
chmod +x /media/embassy/config/postinit.sh
-
Enter script contents to mount the NFS share (take care to replace
<NFS_IP>
with the IP address of your NFS share and</SHARE/PATH>
with the path of the source directory to be mounted:)cat >> /media/embassy/config/postinit.sh<< EOF #!/bin/bash mount -t nfs <NFS_IP>:</SHARE/PATH> /embassy-data/package-data/volumes/filebrowser/data/main/data/NAS/ EOF
-
Run
sudo /usr/lib/startos/scripts/chroot-and-upgrade
to install and persist across reboots dependencies required but not included in StartOS by default. -
Once in the chrooted environment, run
apt install nfs-common
- This package is required to mount the NFS share to a mountpoint on StartOS. -
Run
exit
to close out of the chrooted environment. This will restart StartOS. -
When you reopen Filebrowser you should see the contents of your NFS share at the mountpoint!