- Install NFS Server
sudo apt install -y nfs-kernel-server
- Start NFS Server
sudo systemctl start nfs-kernel-server.server
- Look at NFS Server Status
sudo systemctl status nfs-kernel-server.server
- Edit
/etc/exports
file like this (replace the ip range or the directory as you wish)
/acme-data 192.169.1.25(rw,sync,no_subtree_check,no_root_squash)
- Create the directory mentioned in
/etc/exports
and adjust its permissions
sudo mkdir /acme-data
sudo chown nobody:nogroup /acme-data
sudo chmod -R 777 /acme-data
- Apply the config via:
sudo exportfs -a (ou -rav)
-
Check the status of the NFS Server if everything is ok
-
If you have a firewall enabled, you need to allow NFS traffic:
sudo ufw allow from <client_ip> to any port nfs
sudo ufw enable
sudo ufw status