Linux – NFSv4 and different port

debianlinuxnfsnfs4

Is it possible to start NFSv4 server on different than default (2049) port?

I searched the web for nfs-kernel-server and RPCMOUNTDOPTS, but did not find any configuration options.

My setup uses Debian 9 and standard NFS client / server from apt.

Best Answer

you can set the port number in file /etc/nfs.conf:

[nfsd]
port=4049

and mount as:

mount -o port=4049,....