NFS on Xiaomi: A Complete Guide to Connecting and Using Network Storage

Network File System (NFS) allows Xiaomi devices โ€” whether smartphones, Mi TVs or routers โ€” to access files on a remote server as if they were stored locally, especially for streaming high-resolution media files, backing up or working with large amounts of data without taking up internal memory. But setting up NFS on Xiaomi devices has nuances, from the lack of built-in support in MIUI to the need for manual mounting on Android TV.

In this guide, weโ€™ll look at all the ways to connect NFS, from simple (through third-party applications) to advanced (via ADB and terminal), how to set up a server on a PC or NAS, which ports to open in a Xiaomi router, and why data rates sometimes drop to unacceptable levels, and how to get around the limitations of MIUI if your smartphone canโ€™t see the network folder.

What is NFS and why is it needed by Xiaomi?

NFS is a network protocol developed in 1984, but still relevant today because of its speed and low CPU load. Unlike SMB (which is often used in Windows), NFS is optimized for Unix-like systems, including Android (which runs MIUI), making it an ideal choice for:

  • ๐ŸŽฌ Streaming video 4K/8K bufferless (NFS Transmits data in small packets, reducing delays).
  • ๐Ÿ“ Backup of photos and documents on NAS-server (e.g., Synology or QNAP).
  • ๐ŸŽฎ Storage of games for emulators (for example, RetroArch on Mi Box).
  • ๐Ÿ”ง Development: If you are a programmer, NFS Allows you to mount project folders directly from the server.

On Xiaomi devices, NFS is most commonly used to:

  • ๐Ÿ“บ Mi TV and Mi Box - Watching movies with NAS flash-free.
  • ๐Ÿ“ฑ Smartphones on MIUI โ€” Access files from a PC or server (for example, to work with Termux).
  • ๐Ÿ“ก Xiaomi Routers โ€“ Home Cloud Storage Organization.

The main advantage of NFS over SMB or FTP is faster read/write speed when working with small files (for example, thousands of photos), but there are also disadvantages: the protocol is not encrypted by default (you need to configure NFS over TLS), and the configuration requires knowledge of the command line.

๐Ÿ“Š What do you want to use for? NFS Xiaomi?
Streaming video
Backup
Working with files on NAS
Games/emulators
Other

Preparation: What you need to work NFS on Xiaomi

Before you connect to NFS, make sure you have:

  1. NFS-server: it could be: ๐Ÿ–ฅ๏ธ Computer with Linux (Ubuntu, Debian) or Windows (with installed) NFS Server for Windows). ๐Ÿ› ๏ธ NAS-device (e.g., Synology) DS220+, QNAP TS-251D). ๐Ÿ“ก Router with support USB-storage devices (e.g. Xiaomi) AX9000 openwrt firmware).
  2. Xiaomi device with support NFS: ๐Ÿ“บ Mi TV (all Android models TV). ๐Ÿ“ฑ Smartphones on MIUI (Root or third-party applications are required). ๐ŸŽฎ Mi Box S/Mi Box 4 (support NFS box).

Network connection

  • ๐ŸŒ Local area network (Wi-Fi or Ethernet). NFS Not intended to work on the Internet without VPN!
  • ๐Ÿ”Œ Static IP server (so that the path to the folder does not change).
  • Click Connect and wait for the installation.

If the TV can't see NFS-folder:

  • โš ๏ธ Check that the server is allowed access to IP your Mi TV (know IP You can set up โ†’ On TV. โ†’ Status).
  • โš ๏ธ Make sure that the Xiaomi router does not block traffic between devices (turn off). AP Isolation in Wi-Fi settings).
  • Press Mount and confirm permissions.

After mounting, the folder will appear in the MIUI File Manager on the specified path.

Method 2: Termux (for advanced users)

If you have Termux installed, do:

pkg install nfs-utils


mkdir ~/nfs_mount




mount -t nfs 192.168.1.100:/mnt/nfs_share ~/nfs_mount

To keep the mounting after the reboot, add a command to ~/.bashrc.

How to access NFS from other applications?
Use Mixplorer or Solid Explorer โ€“ they support mounted NFS-folders through the root catalog (/storage/emulated/0/nfs).

Limitations and challenges

โš ๏ธ Note: On smartphones Xiaomi without root mounted NFS-The folder will only be accessible to applications that have access to the storage, VLC can play video with NFS, a Gallery MIUI โ€” no.

If the application does not see the files:

  • Check the permissions on the server (folder should be readable to everyone: chmod) -R 755 /mnt/nfs_share).
  • Use FX File Explorer with Root Access enabled (if root is available).

Solving Common NFS Errors on Xiaomi

NFS can be unstable due to network settings, mounting errors, or MIUI limitations. Here are the most common problems and solutions:

Mistake.Reason.Decision
mount: Operation not permittedThe server does not allow access from the clientโ€™s IP or incorrect rights to the folder.Check /etc/exports on the server. Run sudo exportfs -ra.
NFS server not respondingA firewall or router blocks port 2049.Open TCP/UDP port 2049 on the server and router. Turn off AP Isolation in the Wi-Fi router settings.
Slow transmission speedWi-Fi 2.4 GHz or weak signal is used.Switch to 5 GHz or use Ethernet. Reduce rsize and wsize when mounting (e.g. mount -o rsize=8192,wsize=8192).
The folder is connected, but the files are not displayedIncorrect access rights on the server.Perform sudo chmod -R 755 /mnt/nfs_share.

โš ๏ธ Note: If you are using Xiaomi Mi TV Stick, update your firmware to the latest version โ€“ there was a support error in the older versions NFS v4. Switch to the switch. NFS v3 server settings (/etc/exports add the parameter -v3).

Optimizing NFS Speed on Xiaomi

By default, NFS can run slower than SMBs due to large packet sizes or network delays. Here's how to speed up data transfers:

1. Configuring the mounting parameters

When mounting, specify the optimal values for rsize and wsize (read/write block size).

mount -t nfs -o rsize=32768,wsize=32768,hard,intr 192.168.1.100:/mnt/nfs_share /mnt/local

2. Use of NFS v4 instead of v3

NFS v4 supports more efficient file management and works better over NAT.

  • On the server in /etc/exports, add the fsid=0 parameter:
  • When installing, specify the version:

3. Disabling Attributes (noatime)

If you donโ€™t care about file metadata (access time), add the noatime option:

mount -o noatime,nodiratime

4.MTU network verification

If the speed drops when transferring large files, reduce the MTU on the Xiaomi router to 1472 (in the LAN settings).

๐Ÿ’ก

For streaming 4K video, optimal mounting options are: rsize=65536,wsize=65536,noatime,nodiratime. This will reduce the load on the CPU and eliminate jerks.

How to protect NFS on Xiaomi

NFS doesn't encrypt traffic by default, so it's easy to intercept it on a local network. Here's how to improve security:

1. Restriction of access over IP

In /etc/exports, only the trusted IPs are listed:

/mnt/nfs_share 192.168.1.101(rw) 192.168.1.102(ro)

2.Use of NFS over TLS

To encrypt traffic, use Stunnel or VPN:

  • ๐Ÿ”’ Set up OpenVPN on Xiaomi router and connect to NFS only VPN.
  • ๐Ÿ”’ Use sshfs instead of sshfs NFS, If you need complete safety, but the speed will be lower).

3. Disable unused versions of NFS

In /etc/nfs.conf, leave only the versions you want (e.g. v4):

[nfsd]


vers2=n




vers3=n




vers4=y

4. Firewall settings on Xiaomi router

On Xiaomi routers (such as the AX3600):

  1. Open Settings โ†’ Additional โ†’ Security โ†’ Firewall.
  2. Add a rule to allow traffic from IP yours NFS-server to port 2049.
  3. Turn off UPnP if you don't need it.

โš ๏ธ Never open port 2049 to access from the Internet without a single connection. VPN! NFS Vulnerable to Man-in-the-Middle attacks, and attackers can access your files.

FAQ: Frequent questions about NFS on Xiaomi

Can I connect NFS to Xiaomi without root?
Yes, but with limitations: On the Mi TV and Mi Box, through standard settings or File Commander; on smartphones, through NFS Manager (only some apps will have access); without root, you wonโ€™t be able to mount NFS into system folders (e.g. /system).
Why is NFS slower than SMB on Xiaomi?
Possible reasons: Used NFS v3 instead v4 (Switch to the server settings. Too large packet size (rsize/wsize) for a weak network (reduce to a low net) 8192). Wi-Fi is overloaded (switch to Wi-Fi) 5 GHz or Ethernet. Check the speed with the command: dd if=/dev/zero of=/mnt/nfs_share/testfile bs=1M count=100
How to automatically connect NFS when you start your Mi TV?
There is no built-in auto-connection on Android TV, but you can: Use Tasker + AutoInput plugin for automatic mounting. Install Termux and add a mount command to ~/.bashrc. For Mi TV with PatchWall firmware, the auto-connection is unstable - check manually after turning on.
Can I use NFS to back up MIUI?
Technically, yes, but: ๐Ÿ“ฑ Local backup (through Settings) โ†’ Additionally. โ†’ Backups) do not support NFS. ๐Ÿ”„ Use Swift Backup (requires root) or Titanium Backup to save data directly to the back of the back. NFS. For automatic backup, set up rsync on the server: rsync -avz /path/to/local/backup user@nfs-server:/mnt/nfs_share/backup
How to unmount NFS if Xiaomi is stuck?
If the device does not respond: On the server, run: sudo exportfs -u 192.168.1.XX # Replace XX with the IP client sudo exportfs -ra If this does not help, restart the server: sudo systemctl restart nfs-kernel-server On Mi TV hold the power button for 10 seconds for a forced reboot.