NFS setup on Xiaomi phone: from mounting to speed optimization

Network file system NFS (Network File System, which allows Xiaomi smartphones to access remote folders as if they were on an internal drive, is the perfect solution for working with large media libraries, backups or corporate data stored on the server. NAS-servers, Linux machines or advanced routers, but standard tools MIUI supportive NFS "out of the box – this will require manual configuration, superuser rights or third-party apps.

In this guide, we will analyze all the current ways of connecting. NFS Xiaomi, including the Redmi Note 12 Pro+, POCO F5 and other devices based MIUI 14/15 HyperOS. We will pay special attention to security issues (setting up) rw/no_root_squash), Optimize data transfer speed and solve common errors such as mount: permission denied or server not responding.

What is NFS and why you need it on your smartphone

NFS is a network file access protocol originally developed by Sun Microsystems in 1984, and unlike SMB (Samba) or FTP, NFS is optimized for LANs with minimal overhead, making it ideal for:

  • 🎬 Streaming video in 4K HDR without buffering (e.g. with Synology) DS220+ or QNAP TS-251D)
  • πŸ“ Work with large databases (1C, SQL-dumps) directly from the smartphone
  • πŸ”„ Automatic photo backup bypassing cloud services
  • πŸ–₯️ Remote file management on the server via Termux or FX File Explorer

The main advantages of NFS over alternatives are:

CharacteristicsNFSSMB (Samba)FTP/WebDAV
Transmission speed⚑ High (up to 1 Gbps)πŸƒ Medium (depending on version)🐒 Low (protocol with high overhead costs)
Delay (latency)🟒 Minimum🟑 Moderate.πŸ”΄ Tall.
Support for MIUI❌ No (manual adjustment required)βœ… There is (through "Network and Sharing")βœ… There are (through file managers)
SecurityπŸ”’ Depends on the version (v3/v4) and export settingsπŸ”’ Supports encryption (SMB 3.0+)πŸ”“ Often transmits data in an open form

A critical nuance for Xiaomi: NFS is not supported at the Android core level without superuser rights (root), which means that to work properly, you will need either a rooted device or the use of workarounds through Termux or specialized applications.

Preparation for NFS setup on Xiaomi

Before setting up, make sure all the preconditions are met:

The device is connected to the same network as the NFS-server (Wi-Fi) 5/6 or Ethernet through USB-adopter)

On the server (NAS/router/Linux-PC installed and launched NFS-server (nfs-kernel-server or nfs-utils)

2049/TCP and 2049/UDP ports open in server firewall

Xiaomi has one of the applications: Termux, FX File Explorer or Solid Explorer.

For rooted devices: Magisk and module installed NFS Manager-->

Pay particular attention to setting up /etc/exports on the server, an example of the minimum configuration for access from a smartphone:

/mnt/data  192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash,anonuid=1000,anongid=1000)

Where:

  • 192.168.1.0/24 - Subnet from which access is allowed (replace yours)
  • rw – permission to read and write
  • no_root_squash β€” Maintaining root rights (important for rooted devices)
  • anonuid = 1000 – binding to the user’s UID on a smartphone (usually 1000 for the first user)

NAS (Synology, QNAP, TrueNAS)

Linux server (Ubuntu, Debian, CentOS)

NFS-enabled router (Asus, Keenetic, MikroTik)

Another option-->

Method 1: Connecting NFS over Termux (without root)

Termux is a Linux terminal emulator for Android that allows you to install standard utilities, including the NFS client. This method works on most Xiaomi devices without superuser rights, but has speed and stability restrictions.

Adjustment steps:

  1. Install Termux from F-Droid (the version from Google Play is outdated and does not support packages).
  2. Update repositories and install the necessary packages: pkg update && pkg upgrade -y pkg install nfs-utils openssh -y
  3. Create a mounting point and connect NFS-ball: mkdir ~/nfs_share mount -t nfs -o port=2049,nolock,proto=tcp 192.168.1.100:/mnt/data ~/nfs_share Where 192.168.1.100 β€” IP your server, /mnt/data β€” exportable.

To automatically mount when Termux is started, add a command to the ~/.bashrc file:

echo "mount -t nfs -o port=2049,nolock,proto=tcp 192.168.1.100:/mnt/data ~/nfs_share" >> ~/.bashrc

πŸ’‘

If you have a mount error: operation not allowed, try using the soft option or reduce the protocol version to nfsvers=3 in the mount options.

Method 2: Using FX File Explorer (with root)

The FX File Explorer app is one of the few file managers for Android with NFS support, but superuser rights are required to work properly. This method is suitable for Xiaomi devices with an unlocked bootloader and Magisk installed.

Instructions:

  1. Install FX File Explorer from Google Play and activate Root Access in the app settings.
  2. Go to the Network β†’ Add Storage β†’ NFS section.
  3. Fill in the fields: Server: IP-address NFS-servers (e.g., servers, 192.168.1.100) Port: 2049 (Default Export Path: Path to Exported Folder (e.g., Export Path, /mnt/data) Mount Point: Local folder for mounting (e.g, /storage/emulated/0/nfs_share)

Connect

Once successfully connected, the NFS folder will be displayed in the FX File Explorer root directory, and you can copy files directly, just like a regular flash drive.

How to check if the NFS is properly installed?
Run the command in Termux: df -h | grep nfs If the output contains a line from your NFS-ball (e.g., ball, 192.168.1.100:/mnt/data 100G 50G 50G 50% /data/data/com.nextapp.fx/files/nfs_share), The installation was successful.

Method 3: Manual mounting through Magisk (for advanced)

For users willing to work with ADBs and system modifications, there is a method of integrating NFS at the kernel level, which provides maximum speed and stability, but requires deep knowledge and risks disrupting the device.

Algorithm of action:

  1. Install the NFS Manager module (available in the Kitsune Mask repository) via Magisk.
  2. Connect to the device on ADB Create a folder for mounting: adb shell su mkdir /data/nfs_share
  3. Edit the file. /system/etc/fstab.qcom (or similar to your model, adding a line: 192.168.1.100:/mnt/data /data/nfs_share nfs rw,soft,intr,noatime,nodiratime,rsize=8192,wsize=8192 0 0
  4. Restart the device and check the mounting command: mount | grep nfs

πŸ’‘

Using rsize=8192 and wsize=8192 increases data rates by increasing packet size. Gigabit networks can increase the value to 32,768.

Solving Common Errors When Configuring NFS

Even with the right setup of the server and client, errors can occur, and let’s consider the most common and ways to fix them:

Mistake.Reason.Decision
mount: permission deniedIncorrect rights in /etc/exports or firewall block accessCheck the parameters of rw and no_root_squash. Open the port. 2049 server-side
server not respondingNetwork problems or NFS-server not runningCheck ping to the server. Restart NFS: sudo systemctl restart nfs-server
mount: wrong fs typeNo NFS support in the Android kernelInstall the NFS Manager module via Magisk or use Termux
Slow transmission speedNot optimized mounting parametersAdd options rsize=32768,wsize=32768,hard,intr

A critical mistake for Xiaomi on HyperOS: if a previously configured NFS stopped working after upgrading to HyperOS 1.0+, the reason could be a change in SELinux policy.

  1. Check SELinux status: adb shell getenforce If Enforcing output, switch to Permissive: adb shell setenforce 0
  2. For a permanent solution, edit the file /vendor/build.prop by adding the line: androidboot.selinux=permissive

FAQ: Frequent questions about NFS on Xiaomi

Can I connect NFS to Xiaomi without root?
Yes, but with limitations, you can mount through Termux. NFS-The file will only be accessed within the app, but the global access (for example, in a gallery or music player) will require root rights.
Why After Xiaomi Reboot NFS-ball falls off?
Android does not save custom mount points after rebooting Solutions: Use Tasker to automatically execute the mount command when connecting to Wi-Fi. Add the command to the post-fs-data.d script (Magisk requires). Set up automatic mounting via FX File Explorer (root only).
What is the minimum version of Android that supports NFS?
Technically, NFS can run on any version of Android, but: Android 10+ requires rooting due to scoped storage limitations. Android 8-9 can mount NFS to /sdcard without root, but with limited rights. Android 12+ (including HyperOS) must disable SELinux or use Magisk.
How to transfer files between Xiaomi and NAS over NFS faster?
Optimize the following parameters: Use NFS v4.1 instead v3. Increase the size of the packages: rsize=32768,wsize=32768. Connect via Ethernet (USB-Adopter instead of Wi-Fi. Use the server SSD-file-system XFS. Turn off the time check: noatime, nodiratime. Use: dd if to test the speed=/dev/zero of=./testfile bs=1M count=1024 conv=fdatasync
Can I use NFS to stream video on Xiaomi?
Yes, but with reservations: 🟒 It works well: video in Full HD (1080p) through VLC or MX Player. 🟑 Could be lags: 4K HDR with weak Wi-Fi or high server load. πŸ”΄ Not recommended: streaming 8K high-bitrate (>50 For stable operation: Use mount -o hard,intr to prevent breaks. Configure buffering in the player (for example, in the VLC: Settings β†’ Player. β†’ Network β†’ Cache size).