Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows Server 2025 / Configure NFS Server on Windows Server (2025, 2022, 2019)

November 24, 2026

Configure NFS Server on Windows Server (2025, 2022, 2019)

The Network File System (NFS) protocol is widely used to provide shared access to files and directories in Linux/Unix environments. NFS is commonly used in virtualization environments to provision shared storage for virtual machines and to serve as a centralized backup repository. NFS is also a popular solution for sharing files across different platforms via shared network directories in mixed Windows and Linux/UNIX environments. In this article, we’ll look at how to install the NFS role, share an NFS directory on a Windows Server host, configure user mapping, and mount an NFS directory from a Linux client.

Contents:
  • Installing the NFS Role on Windows Server
  • How to Create an NFS Share on Windows Server
  • Configuring the NFS Server in Windows
  • Mount a Windows NFS Share on a Linux Machine

Built-in NFS server support is available in all currently supported versions of the Windows Server platform (2025, 2022, and 2019) and is implemented by the Server for NFS role. Key features include:

  • The Windows Server NFS server supports all NFS protocol versions: NFSv2, NFSv3, and the latest NFSv4.
  • A fixed RPC port 2049 is used to access the NFS server (NFSv4 protocol versions).
  • Simplified identity mapping is implemented using a flat mapping file.

Installing the NFS Role on Windows Server

Unlike the desktop editions of Windows 10 and 11, which only include a built-in NFS client, Windows Server includes both an NFS server and an NFS client.

The Network File System (NFS) storage role on Windows Server can be installed either via the Server Manager (click Add Roles -> Server Roles -> File and Storage Services -> Server for NFS) or by using PowerShell:

Install-WindowsFeature -Name FS-NFS-Service -IncludeManagementTools

Install Server for NFS on Windows Server

Install-WindowsFeature FS-NFS-Service

For NFSv4 clients to communicate with the NFS server, TCP/UDP port 2049  must be open on the server.

Make sure that Windows Defender Firewall rules are enabled to allow access to NFS:

Get-NetFirewallRule -DisplayName "Server for NFS*","*Portmap*"|ft

The following firewall rules must be enabled:

  • Server for NFS (NFS-TCP-In) – Microsoft-Windows-NFS-ServerCore-NfsSvc-NFS-TCP-In
  • Server for NFS (NFS-UDP-In) – Microsoft-Windows-NFS-ServerCore-NfsSvc-NFS-UDP-In
  • Portmap for UNIX-based Software (TCP-In) – for NFSv3
  • Portmap for UNIX-based Software (UDP-In) – for NFSv3

Enable firewall rules for NFS server

NFS v3 requires a dynamic RPC port range as well as TCP port 135 (RPC Endpoint Mapper) and TCP/UDP port 111 (Portmap for UNIX Software) to be open.

How to Create an NFS Share on Windows Server

You can create a shared NFS directory in Windows via the graphical Server Manager console:

  1. Expand the File and Storage Services role in Server Manager.
  2. Go to the Shares section, then click Tasks -> New Share -> NFS Share – Quick. Configure NFS Share quick
    The NFS Share Advanced option can only be used together with the File Server Resource Manager (FSRM) role. This mode provides granular access control, quotas, file classification, and other advanced file server options.
  3. Next, specify the name and local path of the directory you want to share over NFS.Select a directory to share over NFS
  4. Then select the authentication type. The NFS server on Windows supports Kerberos v5 authentication. If your clients don’t support Kerberos authentication, you must enable the No server authentication (AUTH_SYS) option. This is a less secure UNIX authentication method which uses UIDs and GIDs to determine access permissions. The Enable unmapped user access option allows NFS users without a direct mapping to a Windows account to access the share. If this option is not enabled, a mapping must be configured between the user and a Windows account.
    You can allow users to be identified by their UID or GID on the UNIX device (Allow unmapped user access by UID/GID) or allow anonymous access without authentication (Allow anonymous access).Configure NFS server authentication
  5. Configure the permissions for the NFS share. Click Add to open the permissions configuration dialog. NFS share permissions
  6. You can use this option to select which hosts or groups are permitted to connect to the NFS share. For example, you can restrict access based on the client’s IP or DNS address in the Host field. To allow access for all devices, select the All Machines option. In the language encoding settings, select ANSI and set the required access permissions: No access, Read only, or Read + Write. Add NFS permissions on Windows
  7. Next, configure the NTFS access permissions for the folder.
    NTFS permissions define the base level of access to files and folders on the server, while NFS-specific permissions, user mapping configurations, and NFS share permissions control access over NFS network connections.
  8. Confirm the creation of the NFS share.

You can also use PowerShell to create a shared NFS network directory:

New-NfsShare -Name NFSShare2 -Path "C:\Shared\nfsshare2" -AllowRootAccess $false -Permission ReadWrite

New-NfsShare - create share PowerShell

To view the NFS access permissions for a directory:

Get-NfsSharePermission nfsshare

Change the access permissions for an NFS share:

Grant-NfsSharePermission -Name NFSShare2 -ClientName 192.168.1.123 -ClientType host -LanguageEncoding ANSI

Configuring the NFS Server in Windows

To list the current NFS server configuration, run the following command:

Get-NfsServerConfiguration

Get-NfsServerConfiguration

State : Running
LogActivity : Not Configured
CharacterTranslationFile : Not Configured
DirectoryCacheSize (KB) : 128
HideFilesBeginningInDot : Disabled
EnableNFSV2 : True
EnableNFSV3 : True
EnableNFSV4 : True
EnableAuthenticationRenewal : True
AuthenticationRenewalIntervalSec : 600
NlmGracePeriodSec : 45
MountProtocol : {TCP, UDP}
NfsProtocol : {TCP, UDP}
NisProtocol : {TCP, UDP}
NlmProtocol : {TCP, UDP}
NsmProtocol : {TCP, UDP}
PortmapProtocol : {TCP, UDP}
MapServerProtocol : {TCP, UDP}
PreserveInheritance : False
NetgroupCacheTimeoutSec : 30
UnmappedUserAccount :
WorldAccount : Everyone
AlwaysOpenByName : False
GracePeriodSec : 240
LeasePeriodSec : 120
OnlineTimeoutSec : 180

Use the Set-NfsServerConfiguration cmdlet to change the NFS server settings. For example, the following command disables support for the NFSv2 protocol:

Set-NfsServerConfiguration -EnableNFSV2 $false

In Windows, you can also use the Services for NFS MMC snap-in (nfsmgmt.msc) to manage the NFS server settings. This snap-in allows you to change the NFS transport protocol (TCP + UDP are used by default), enable NFS access logging, manage file locks, and monitor client active connections.

Configure settings using Services for NFS snap-in

NFS server logging

Now, let’s look at how to configure user mapping between an Active Directory user account and the corresponding Linux user’s GID and UID.

In Linux, you can get a user’s UID and GID using the command:

$ id username

The output shows the user’s UID, primary GID, and group memberships. In this example, the UID and GID are both 1000.

linux - get uses UID and GID

Configure a Windows NFS server to retrieve UNIX-to-Windows user identity mappings (UID/GID) directly from Active Directory:

Set-NfsMappingStore -EnableADLookup $true -ADDomainName "woshub.local"

To check the current identity mapping store:

Get-NfsMappingStore

Create a new mapping entry for the FS01_NFS_users group in Active Directory and assign it the Unix group ID (GID) 1000.

New-NfsMappedIdentity -MappingStore AD -GroupName FS01_NFS_users -GroupIdentifier 1000

Check the group’s mapping:

Get-NfsMappedIdentity -MappingStore AD -AccountType Group -AccountName FS01_NFS_users

Map the specific Windows user account to a Unix identifier (UID and GID):

Set-NfsMappedIdentity -MappingStore AD -UserName jsmith -UserIdentifier 1000 -GroupIdentifier 100

Get the mapping settings for the specified domain user:

Get-NfsMappedIdentity -AccountName jsmith -AccountType User

This allows you to map Linux users to local Windows or Active Directory accounts.

Mount a Windows NFS Share on a Linux Machine

You can now test the connection to the Windows Server NFS server from any client. For this example, we will use a Linux host running Debian.

Install the NFS client package on a Linux machine:

$ sudo apt-get install -y nfs-common

Create a new mount point on a Linux host:

$ sudo mkdir /mnt/nfs

Mount the NFS share from a remote server to the specified local directory:

$ sudo mount 192.168.10.174:/nfsshare /mnt/nfs

Check that you can see all the files in the NFS directory on the remote server:

mount NFS share in Linux

To unmount the NFS share, run:

$ umount /mnt/nfs/

To automatically mount an NFS directory, you can add an entry to /etc/fstab .

0 comment
0
Facebook Twitter Google + Pinterest
Questions and AnswersWindows Server 2019Windows Server 2022Windows Server 2025
previous post
Windows Installer Folder Too Large? How to Clean Up Safely
next post
Managing PowerShell Modules in Windows: Install, Update & Remove

Related Reading

How to Move (Migrate) Windows Shares to a...

February 26, 2026

Updating UEFI Secure Boot Certificates on Windows Devices...

April 27, 2026

Protect Windows Server from DDoS and Brute-Force Attacks...

May 15, 2026

Windows: Create (Install) a Service Manually

December 17, 2025

CrowdSec on Windows: From Installation to Threat Blocking

July 6, 2026

Pin and Unpin Apps to Taskbar in Windows...

March 26, 2026

Backup/Sync to Cloud Storage with Rclone on Windows

October 9, 2026

Inactive TS Ports in Windows: Causes and Fixes

July 21, 2026

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Managing PowerShell Modules in Windows: Install, Update & Remove

    November 24, 2026
  • Windows Installer Folder Too Large? How to Clean Up Safely

    November 12, 2026
  • Shrink WSL2 and Docker Desktop VHDX Files in Windows

    November 11, 2026
  • We Can’t Sign In to Your Account: Fix Temporary User Profile in Windows

    October 20, 2026
  • Backup/Sync to Cloud Storage with Rclone on Windows

    October 9, 2026
  • Fix Missing “Yes” Button in User Account Control Prompt on Windows

    October 7, 2026
  • Block Specific Keyboard Shortcuts with Keyboard Filter on Windows

    October 3, 2026
  • How to Set Task Priority in Windows Task Scheduler

    September 22, 2026
  • AutoStart Program at RDP Logon in Windows RDS

    September 8, 2026
  • How to Convert Windows Machine into a Proxmox VM

    August 30, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • Converting Windows 10 to Enterprise LTSC Without Losing Data
  • How to Remove ‘Some Settings are Managed by Your Organization’ on Windows 11 or 10
  • Remove the Max Path Length Limit (260-Characters) on Windows
  • Installing Windows without USB/DVD or Other External Drives
  • Configure Autostart and Boot Order for VMs on Proxmox
  • How to Pause (Delay) Update Installation on Windows 11 and 10
  • Uninstalling Windows Updates via CMD/PowerShell
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top