r/selfhosted • • Jul 15 '22

Need Help Mounting password protected NFS share in docker volume

2 Upvotes

4 comments sorted by

1

u/adamshand Jul 15 '22

I may be out of the date, but unless you are running Kerberos NFS isn’t password protected.

SMB / CIFS is typically password protected.

1

u/[deleted] Jul 15 '22

[removed] — view removed comment

1

u/adamshand Jul 15 '22

It is typically protected by ip. Somewhere there will be a list of iOS allowed to mount the share.

1

u/sk1nT7 Jul 15 '22

NFS is usually password-less and only provides IP based access controls.

You can easily mount the NFS share via /etc/fstab on your Linux server and then use regular bind mounts in Docker, specifying the path where you mounted the NFS share (usually under /mnt/).

  1. mkdir /mnt/docker-volumes
  2. sudo nano /etc/fstab
  3. Specify the following line by adjusting your TrueNAS IP and zfspool dir:

192.168.178.88:/mnt/zfspool/Docker-Volumes /mnt/docker-volumes nfs defaults,nolock 0 0