Installing NFS Server / NFS Client on Debian

NFS (Network File System) is a network file system that allows users to access files and directories located on remote computers. Faster compared to SAMBA and less resource intensive compared to encrypted remote file systems – sshfs, SFTP …

Installing an NFS server

Updating the package list

$ sudo apt update

Installing an NFS server

$ sudo apt install nfs-kernel-server

Create a directory, which we will share in the future, and set access rights

$ sudo mkdir /mnt/storage
$ sudo chmod 777 /mnt/storage/

Allow network access to the directory for a specific client

$ sudo nano /etc/exports

Applying the network access settings

$ sudo exportfs -r


$ sudo systemctl status rpcbind nfs-server

$ sudo exportfs

Installing the NFS client

Updating the package list

$ sudo apt update

Installing the NFS client

$ sudo apt install nfs-common

We start the services

$ sudo systemctl start rpcbind
$ sudo systemctl enable rpcbind

Create a mount point

$ sudo mkdir /mnt/localstr
$ sudo chown user:user /mnt/localstr

Mount the NFS directory

$ sudo mount -t nfs4 /mnt/localstr


  • – NFS server address
  • / mnt / localstr – local mount point

Setting up automatic mounting

$ sudo nano /etc/fstab
[...]    /mnt/localstp    nfs    defaults    0 0

Related Posts