I happen to have a Synology NAS on my internal network. I mainly use if for backup purposes, for example automatically backing up all photos that I store on my Windows PC at my home office. For the backup process, I use the Synology product Cloud Station Backup, which supervises certain folders and makes sure any changes are pushed to my Synology for safekeeping.

I also happen to have Linux servers in my home network, and sometimes I want to access my backed up documents or photos from my Linux servers. One way of doing it is rsyncing, another way is simply mounting an NFS share. The advantage with mounting an NFS share is that you dont' actually spend disk space on your Linux computer, but you still get access to your files over the wire. For accessing tens of thousands of photos, and videos, an NFS share is ideal.

Luckily, with Synology it's a breeze to share your files on an internal network. WARNING! Please make sure you are on a secure network before doing this.

The original Synology tutorial can be found here.

In short the process is as follows:

1) Log in to your Synology as admin, and go to "Control Panel > File Services" and enable NFS. 2) Go to "Control Panel > Shared Folder" next, and find the folder you want to expose. Edit the share and create an NFS permission.

  • In my case, I only needed write protected access (read-only)
  • I used Squash to give all users accessing the share admin privileges (this was needed to give non root users under Linux access to the share).
  • I added the IP of the server on my internal network that needed to mount the NFS share.
  • Finally, I checked asynchronous.

3) I installed NFS on the server

  • sudo apt install nfs-common

4) I prepared a mount point and added the Synology share to my fstab

  • sudo mkdir /mnt/synology-folder
  • sudo vi /etc/fstab
  •\040folder /mnt/synology-folder nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

    • Change the IP to match your Synology
    • In fstab, use \040 in place of whitespace

    5) I mounted to check if it worked as planned

    • sudo mount /mnt/synology-folder

Now, I had access to my folder from my Linux server, without needing to be root on my server. Sweet. Mission accomplished!

Previous Post Next Post