WRITELOOP

CREATE NFS SHARE ON PROXMOX SERVER TO MAKE IT AVAILABLE ON THE NETWORK

One of the features on my new Proxmox server will be to provide NFS shares on my home network, which are compatible with lots of machines/clients/systems and will be useful to share files between the Proxmox host and its' guests also. Here are the steps required to setup the NFS server the clients.

2023 October 3

On the server (host)


# gets uid and gid of the user nobody, which will be the owner of the NFS share
$ id nobody

# adjust the permissions on the folder that will be served by NFS
$ chown -R nobody:nogroup /nfs/public
$ chmod -R 777 /nfs/public

$ apt install nfs-kernel-server

# below is the file that has the list of the NFS shares
$ nvim /etc/exports
/nfs/public *(rw,sync,no_subtree_check,anonuid=65534,anongid=65534)

$ systemctl restart nfs-kernel-server

On each client (e.g. Proxmox KVM guest)


$ apt update
$ apt install nfs-common

# folder on which the remote NFS share will be mounted into
$ mkdir /mnt/public

# add an entry to /etc/fstab, so it can be automatically mounted if available
$ nvim /etc/fstab
[Proxmox_Host_IP_here]:/nfs/public /mnt/public nfs defaults,nofail 0 0