File sharing with NFS – Installation

Status: Work in progress. Rough collection of ideas about the content.

Author: N.N. | Creation Date: N/A | Last update: N/A | Related Fedora Version(s): 35,36

NFS, the Network File System, is a mature protocol designed to share files between Unix-type systems. Fedora Server Edition installs it by default, although without configuring and not activated. Fedora Server supports a kernel space NFS server as well as user space NFS server.

Possible/intended topics

  • Preparation

    • How to manage access (UID/GID/IP based vs. authentification / NFS 4)

    • Storage Organisation

      • Decide about organizing shares (distributed over various directories as needed, central provision of files, central base directory with symbolic links or bind mounts).

      • Defining (optionally) a base directory, e.g. /srv/nfs-export or /var/lib/export (or another location in compliance with FHS)

    • In case of central provision create a logical volume (according to Fedora Server storage recommendation) or a subdirectory

    • Ensure software is installed

  • Create configuration file

  • (optionally) configure password authentification (NFS 4)

  • (optionally) deactivate rpcbind

    Set 'vers3=n' in the '[nfsd]' section of /etc/nfs.conf, mask the RPC services, and restart NFS:

    systemctl mask --now rpc-statd.service rpcbind.service rpcbind.socket systemctl restart nfs-server

See for some additional ideas:

Preparing the NFS Server

The objective of this guide is the kernel space NFS server, already included in the default installation. If it is missing, then a system administrator can simply reinstall it.

Decide about provided access method(s)


Organizing storage

In principle, NFS can share any directory on the server. However, it makes sense to concentrate at least generally shared files in a central location. It is common practice to create a directory exports or nfs-exports. Suitable parent directories are /var/lib/ or /srv/. The latter fits a bit better according to FHS. Following Fedora Server storage rationale, a system administrator will create a logical volume and mount it to /srv/nfs-exports. The easiest way is to use Cockpit with its Storage Module.

Ensure software is already installed


Activating NFS

The default installation installs NFS, but neither enables it nor configures the firewall accordingly.

[…]# systemctl enable nfs-server --now
[…]# systemctl status nfs-server
[…]# firewall-cmd --permanent --add-service=nfs
[…]# firewall-cmd --reload

Create configuration file


(optionally) configure password authentification (NFS 4)


(optionally) deactivate rpcbind

These nice people helped write this page:


Want to help? Learn how to contribute to Fedora Docs.