Connection NFS Xiaomi: from setting up a server to mounting a network disk

Network file system NFS (Network File System allows Xiaomi devices – whether it’s Mi TV, TV Box or smartphone MIUI β€” And you can access remote folders as if they're local, and that's convenient for streaming movies in the Internet. 4K HDR without buffering, backing up photos or working with large files directly from NAS. However, standard instructions often miss the nuances of Xiaomi firmware, where support is provided. NFS It can be limited or hidden in the engineering menu.

In this guide, we will discuss three ways to connect: through embedded tools. MIUI/PatchWall, using third-party applications (for example, NFS Manager) and manual mounting for advanced users. We will also focus on common errors such as mount: permission denied or server not responding, which arise due to the features of the Xiaomi kernel and the security policy of Android. 12+.

1. What is it? NFS Why do you need it on Xiaomi?

NFS (Network File System is a file access protocol developed by Sun Microsystems in 1984. SMB (which is more commonly used in Windows), NFS optimized UNIX-And it's a system like this, including Android and the Linux kernel of Xiaomi devices:

  • πŸš€ High speed when working with small files (for example, databases or application cache).
  • 🎬 Support for streaming without lags is critical for 4K@60FPS on Mi TV.
  • πŸ”’ Flexible access rights (through the UID/GID), What is important for multi-user systems.
  • πŸ“± Low battery consumption on smartphones compared to FTP WebDAV.

On Xiaomi devices NFS relevant in the following scenarios:

  • πŸ“Ί Connection NAS (Synology, QNAP) Or a home server to Mi. TV Stick/TV Box S for watching movies without copying.
  • πŸ“ Organization of a common storage for family photos on smartphones Redmi Note 12 Pro+ Xiaomi 13 Ultra.
  • πŸ–₯️ Using Xiaomi Pad 6 as a thin client for remote work with files on the server.

⚠️ Attention: Protocol NFS It doesn't encrypt traffic by default, unless your network is secure. VPN or IPSec, data (including passwords) may be intercepted. NFSv4 with Kerberos or SSHFS.

πŸ“Š What do you want to use for? NFS Xiaomi?
Streaming video on TV
Sharing files between devices
Backup
Work with NAS
Another option

2.Preparation: requirements and limitations

Before you start setting up, check the compatibility of your Xiaomi device:

Type of deviceSupport for NFSLimitationsRecommendations
Mi TV 4S/5X, TV Box SYes (NFSv3)No. GUI for settings, only manual mountingUse adb or Termux
Redmi/Smart TV (2020–2023)Partially (depends on firmware)There may be no core modules nfs.koCheck through lsmod | grep nfs
Smartphones MIUI 12–14Yes (requires root or Termux)SELinux restrictions block mountingUse it. NFS Manager or Mount Manager
Xiaomi Pad 5/6Yes (full)There is no built-in client, only third-party applicationsRecommended Solid Explorer + plugin

General requirements for all devices:

  • 🌐 Local area network with support IPv4 (NFS malfunctioning IPv6 on most routers).
  • πŸ“‘ Static IP for the server (or reservation) DHCP router).
  • πŸ”§ NFS-PC-server/NAS Exported folders (instructions for Windows, Linux and Synology – below).
  • πŸ› οΈ Debugging by USB (ADB) for TV-consoles or Termux for smartphones.

⚠️ Attention: On devices with MIUI 13+ Android 12+ You may need to disconnect MIUI Optimization in the Developer Settings (Settings) β†’ The phone. β†’ Version. MIUI β†’ 7 times to tap. Without that, mounting. NFS will be reset after rebooting.

Check out the firmware version of Xiaomi device

Set up static. IP router-server

Export folders to NFS-server (example of command: /etc/exports)

Put the debugging on. USB on TV-console

Download Termux or NFS Manager from Official Sources-->

3.Tune in. NFS-servers (Windows, Linux, NAS)

Without a properly configured server connection NFS Xiaomi is not possible. Let's look at the configuration for three popular platforms:

3.1. Linux (Ubuntu/Debian)

On a server running Linux, do:

sudo apt update && sudo apt install nfs-kernel-server


sudo nano /etc/exports

Add a line (replace) 192.168.1.0/24 on your subnetwork and /path/to/folder real-world):

/path/to/folder 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)

Apply the changes and restart the server:

sudo exportfs -a


sudo systemctl restart nfs-kernel-server

3.2. Windows 10/11

Windows will require third-party software, such as haneWIN. NFS Server:

  1. Download and install hanewin NFS Server.
  2. In the export settings, specify the folder and allow access to IP-Addresses of your Xiaomi devices.
  3. Turn on the service. NFS control panel β†’ Administration β†’ Services.

3.3. Synology/QNAP NAS

Synology. DSM:

  1. Open the control panel. β†’ File service β†’ NFS.
  2. Create an export rule by specifying IP Xiaomi devices and rw rights (read/write).
  3. Turn on the support. NFSv3 (Xiaomi TV It's a must).

πŸ’‘

If your router supports DDNS (For example, Xiaomi Router AX6000), set up dynamically DNS remotely NFS This will allow you to connect to the server even outside the home network (but requires additional security measures!).

4. Connection NFS Xiaomi TV and TV Box

Devices on PatchWall (e.g. Mi) TV 5 Pro or TV Box 4K) They do not have a graphical interface for NFS, but support the installation through ADB Or Termux. Let's look at both.

Method 1: Through ADB (rootless)

Connect. TV-PC-box USB and do it:

  1. Activate. ADB in the developer settings (Settings) β†’ About the device β†’ Assembly number β†’ tap).
  2. Connect via command line: adb connect 192.168.1.100:5555 # Replace on IP yours TV adb shell
  3. Create a mounting point and connect NFS: mkdir /sdcard/nfs_share mount -t nfs 192.168.1.10:/path/to/folder /sdcard/nfs_share -o nolock,soft

Method 2: Through Termux (for advanced)

If TV Box installed by Termux:

  1. Update packages and install nfs-utils: pkg update && pkg install nfs-utils
  2. Mount the folder: mount -t nfs -o port=2049,nolock 192.168.1.10:/path/to/folder /sdcard/nfs_share

⚠️ Attention: On Mi TV Stick and some models TV Box Linux kernel built without support NFSv4. If the installation does not work, force the version of the protocol: -o vers=3.

How to check the available versions NFS server-side?
Execute the command on the client (through the ADB or Termux): rpcinfo -p 192.168.1.10 | grep nfs If the output has a line with nfs 3, This means that the server supports NFSv3. For NFSv4 look for nfs 4 or nfs_acl 4.

5. Connection NFS on Xiaomi smartphones (MIUI)

On Xiaomi smartphones (such as Xiaomi) 13T or Redmi Note 12 connection NFS It is complicated by the limitations of Android and MIUI. There are two methods: through apps or with root access.

Method 1: Annex NFS Manager

The easiest option for users without root:

  1. Download NFS Manager from Google Play.
  2. Add a new server by specifying IP and exported folder.
  3. Select the mounting point (for example, /storage/emulated/0/nfs).
  4. Press Mount and confirm permissions.

5.2 Method 2: Termux + hand-mounting

For users who are ready to work with the command line:

  1. Install Termux from F-Droid (the version from Google Play is outdated).
  2. Update packages and install nfs-utils: pkg update -y && pkg install nfs-utils -y
  3. Create a folder for mounting and connect NFS: mkdir ~/storage/shared/nfs_share mount -t nfs -o port=2049,nolock 192.168.1.10:/path/to/folder ~/storage/shared/nfs_share

On smartphones with MIUI 14 and Android 13+ fitting NFS Termux may require SELinux to be disabled (setenforce 0 command), but this is a temporary solution – after the reboot, the protection will turn on again.

πŸ’‘

For a stable job. NFS On Xiaomi smartphones without root, use apps like Solid Explorer with a plugin NFS Plugin. They circumvent Android's limitations by using their own kernel to mount.

6. Solving typical errors

When connected NFS Xiaomi users are most often faced with the following problems:

Mistake.Reason.Decision
mount: permission deniedIncorrect rights on the server or SELinuxCheck it out. /etc/exports on the server and run setenforce 0 client-side
server not respondingPorts 2049 or 111 (portmapper)Open ports on the router and check the firewall on the server
Protocol not supportedLack of support NFSv4 client-sideUse it. -o vers=3 mounting
Stale file handleServer reboots or exports changeRemount the folder or restart the nfs server

If the error does not disappear, check the logs on the server:

sudo tail -f /var/log/syslog | grep nfs

7. Optimization of productivity NFS

By default. NFS It can run slower than local storage to speed up access:

  • πŸ”„ Increase the size of the read/write buffer when mounting: mount -t nfs -o rsize=8192,wsize=8192 192.168.1.10:/folder /mnt/nfs
  • πŸ“Ά Use a wired connection (Ethernet) instead of Wi-Fi for the TV Box.
  • πŸ”§ On the server, disable atime (last access time) for exported folders: mount -o remount,noatime /path/to/folder
  • πŸ›‘οΈ For Mi. TV with a weak processor (e.g., Amlogic) S905) Limit the number of files open at the same time: mount -o nfsvers=3,hard,intr,rsize=32768,wsize=32768

For speed testing, use dd:

dd if=/mnt/nfs/large_file of=/dev/null bs=1M count=1000

8. Alternatives NFS Xiaomi

If NFS not suitable (for example due to setup or security issues), consider alternatives:

  • πŸ“‚ SMB (Samba: Easy to set up, but slower when working with small files. Built into Mi TV as β€œNetwork environments".
  • πŸ”— WebDAV: Works through HTTP/HTTPS, It is supported by Solid Explorer and FX File Explorer.
  • πŸ” SSHFS: Encrypted analogue NFS, requires a server SSH (For example, OpenSSH on Linux).
  • ☁️ OwnCloud/Nextcloud: Self-sufficient solutions with web interface and mobile clients.

Comparison of protocols for Xiaomi:

ProtocolSpeed.SecurityDifficulty setting upSupport for MIUI
NFS⭐⭐⭐⭐⭐⭐⭐ (kerberos)⭐⭐⭐⭐Partial (requires) ADB/Termux)
SMB⭐⭐⭐⭐⭐⭐ (coded)⭐⭐Full (built-in client)
SSHFS⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐Through Termux/applications

FAQ: Frequent questions

Can I connect NFS to Xiaomi without root?
Yes, but with limitations. TV Box and Mi TV It's possible through ADB, on smartphones, with the help of applications like NFS Manager or Solid Explorer with a plugin. Full mounting to the system (for example, in the /system) Root is not possible due to Android limitations.
Why? NFS It is disabled after restarting the device?
This is because Android and MIUI Solutions: Use Tasker to automatically mount after boot. Add mount command to init.d (requires root). TV Box to create a script in /data/local/userinit.sh (need ADB).
How to connect NFS Xiaomi TV router USB-accumulator?
Most routers (including Xiaomi Router) do not support NFS-server, only Samba or FTP. Exceptions are routers with OpenWRT firmware or DD-WRT, where you can install nfs-kernel-server. Alternative: plug in USB-drive to Raspberry Pi or PC and configure it NFS.
What version? NFS It works better with Xiaomi?
For most devices, Xiaomi is optimal. NFSv3: Supported by all Mi models TV and TV Fewer compatibility issues than the NFSv4. Hurry up. NFSv2 when working with large files. NFSv4 It is only necessary to use if the server does not support the server. NFSv3 Extended access rights are required (ACL).
Can I stream? 4K HDR video NFS lagless?
Yes, but subject to conditions: Network speed of at least 100 Mbps (for 4K HDR bitrate+ Mbps: Use of wired connection (Ethernet) or Wi-Fi 6 (802.11ax). Mounting with rsize parameters=32768,wsize=32768,hard,intr. Disconnecting the energy-saving mode on the router and TV-If the video is slowing down, check the download. CPU on the server top command – perhaps a bottleneck in performance NAS.