Why is NFS on a smartphone convenient?
Network File Systems (NFS) are traditionally associated with servers and desktops, but Xiaomi Redmiβs current MIUI 14/15-based smartphones are capable of working with them, and the main advantage is that remote folders are accessed as local folders without having to sync via cloud or USB.
β They keep the media stores on. NAS-servers (Synology, QNAP) They want to stream movies in 1080p/4K bufferless;
Work with large files (projects, backups) and need instant access;
Use a smartphone as a thin client for a remote machine (for example, for development through Termux).
Unlike in the past. SMB (which often slows down on Android or WebDAV (with speed limits), NFS Minimum delays and maintains UNIX-rights that are critical to some applications: MIUI It does not include support by default NFS to the kernel, so you will need a workaround through Termux or third-party applications.
Requirements and preparation of the device
Before you start setting up, make sure your device meets the minimum requirements:
- π± Redmi: any based on Qualcomm Snapdragon (Note series) 10/11/12, K40/50) or MediaTek Dimensity (Note) 12 Pro+, K60). On budget models (e.g. Redmi) 10A) possible lag.
- π Version. MIUI: 13.5+ (Older versions may lack libraries β MIUI 14/15 with the latest security patches.
- π Network: connection to NFS-Wi-Fi server only 5/6 (mobile Internet is unstable. Recommended speed: from 100 Mbit/s.
- π§ Rights: root is not required, but you need access to Termux with a proot-distro package or application NFS Manager (paid).
If you use NAS-server (Synology, QNAP, TrueNAS, make sure it's on it:
- π On. NFS-Service (usually in the File Management section) β Public access β NFS);
- π Allowed connections with IP-addresses of your local network (for example, 192.168.1.0/24);
- π Unplugged. NFS v4.1+ (Android works better with you NFS v3).
β οΈ Note: Some Xiaomi.eu firmware or custom ROM (For example, PixelExperience support NFS It can be turned off at the core level. /proc/filesystems | grep nfs in Termux β if no response is given, core reassembly will be required.
Method 1: Connecting via Termux (without root)
This method is suitable for most Redmi users and does not require superuser rights.We will use Termux with root emulation via proot-distro.
Step 1: Install Termux and Dependencies
1. Download Termux from F-Droid (the version from Google Play is outdated and does not support proot).
2. Update packages and install proot-distro:
pkg update && pkg upgrade -y
pkg install proot-distro -y3. Create a virtual Ubuntu environment (it contains all the necessary utilities for NFS):
proot-distro install ubuntu
proot-distro login ubuntuStep 2: Installation NFS-client
Inside the Ubuntu virtual environment, do:
apt update && apt install -y nfs-common
modprobe nfsIf the modprobe command produces an Operation not permitted error, then the MIUI kernel does not support module loading, in which case go to Method 2 (NFS Manager application).
Step 3: Mounting NFS-balls
1. Create a mounting point:
mkdir ~/nfs_share2. Connect the Remote Folder (Replace) IP_SERVICE and / way / to / folder on your own):
mount -t nfs IP_SERVICE:/path/to/folder ~/nfs_share -o nolock,soft,udpFlags -o nolock,soft,udp are critical for stable Android work!
Check the mounting:
df -h | grep nfsInstalled by Termux from F-Droid|Created a virtual environment Ubuntu|Installed package nfs-common|The nfs module is loaded (modprobe)|The folder for mounting created|The mount command is executed without errors-->
β οΈ Warning: After the smartphone is restarted, the mounting will reset. To automate the process, add the mount command to the file. ~/.bashrc (but it will only work after manually running Termux). + Termux plugin: Tasker.
Method 2: NFS Manager Application (paid but simple)
If working with Termux seems difficult, you can use the application NFS Manager (cost) ~300β½). It provides a graphical interface for mounting NFS-The ball and works on most Redmi devices without root.
Instructions for setting:
- Install NFS Manager from Google Play.
- Open the application and press + (Add server).
- Fill in the fields: Server name: arbitrary (e.g., "My" NAS"); IP-address: NFS-servers (e.g., servers, 192.168.1.100); Path: Exportable folder (e.g., exported folder, /volume1/movies); Protocol: Select NFS v3; Port: Leave it 2049 (default).
Save.
Connect
Once you have successfully connected, the folder will appear in the Storage β NFS section of any file manager (e.g., Mi File Manager or Solid Explorer).
| Parameter | Termux | NFS Manager |
|---|---|---|
| Root is required. | β No. | β No. |
| Cost | β Free of charge. | β οΈ ~300β½ |
| Auto-mounting | β Only manually. | β There's an option. |
| Support for NFS v4 | β No, only. v3) | β Partially. |
| Speed of operation | β‘ Faster (native client) | π’ Slower (Java wrapper) |
π‘
If NFS Manager canβt see the server, check what is on the server. NAS You're allowed to access from your Wi-Fi subnet, for example, in Synology, this is configured into the Control Panel. β File sharing β NFS β Export rules. Add a line. 192.168.1.0/24(rw,async,no_root_squash) (replace the subnet with your own).
Addressing common mistakes
Even with the right NFS setup on Redmi, there can be problems, and here are the most common ways to fix them:
1. "Permission denied" error during mounting
Reason: The server is not allowed access to your IP or has incorrect rights.
Decision:
- π§ On the server edit the export file (/etc/exports) And add the rule: /path/to/folder 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)
- π Reboot. NFS-Service: sudo exportfs -a && sudo systemctl restart nfs-server
2. Hanging up when copying files
Reason: Uses TCP instead of UDP or locks are enabled.
Solution: When mounting in Termux, add the following flags:
mount -t nfs IP_ SERVER:/path ~/nfs_share -o nolock,soft,udp,timeo=10,retrans=23. Low data transfer speed
Causes and solutions:
- πΆ Weak Wi-Fi: Connect to 5GHz or use Wi-Fi 6 (on Redmi Note 12 Pro)+ newer).
- π Powering the processor: Enable performance mode in Settings β Battery. β Power regimens.
- π§ MTU: Reduce packet size to 1472 (in router settings or via Termux by ifconfig command) wlan0 mtu 1472).
What if NFS shuts down after the device sleeps?
Optimizing NFS Performance on Redmi
By default, NFS on Android doesn't work as fast as it does on a PC, but there are ways to speed up data transfer:
Configuring buffering
In Termux, before mounting, perform:
echo 1048576 > /proc/sys/net/core/rmem_default
echo 1048576 > /proc/sys/net/core/wmem_defaultThis will increase the size of the network buffer, which is especially useful for transferring large files (like movies in 4K HDR).
2.Using NFS over TCP (UDP alternative)
Although UDP is usually faster, some networks have more stable TCP.
mount -t nfs IP_ SERVER:/path ~/nfs_share -o tcp,vers=3,rsize=32768,wsize=327683. Disable rights verification (for trusted networks)
If you are connected to your home network and trust all devices, you can turn off the rights check:
mount -t nfs IP_SERVICE:/path ~/nfs_share -o noacβ οΈ This will reduce safety, but increase speed. 10-15%.
mount -t nfs IP_SERVER:/way ~/nfs_share -o udp,nolock,noac,rsize=32768,wsize=32768,timeo=14
These settings are optimal for Redmi with Wi-Fi 6 and NAS synology-based DS220+ similar.-->
How to protect data when using NFS
NFS doesn't encrypt traffic in the first place, so it's best not to use it on open networks like a cafe or a hotel.
1. Restriction of access over IP
On the server, allow connections only from IP-address of your devices, for example, in /etc/exports:
/path/to/folder 192.168.1.100(rw) 192.168.1.101(ro)Where 192.168.1.100 is your Redmiβs IP and 192.168.1.101 is another read-only device.
2. VPN for remote access
If you need to connect to NFS from the outside (for example, via mobile Internet), configure WireGuard or OpenVPN:
- Install. VPN-server NAS (For example, through the WireGuard Synology package).
- On Redmi, connect to a VPN and then mount NFS over local IP (e.g. 10.0.0.1).
3. Encrypting folders
If the NAS supports eCryptFS or EncFS, encrypt the folder before exporting over NFS. For example, on Synology:
- Create an encrypted folder in File Station.
- Export it to the NFS as usual.
- When mounting on Redmi, you will need to enter a password (via Termux or NFS Manager).
β οΈ Note: Do not store passwords from NFS or VPN note-book SMS! Use a password manager (like Bitwarden or KeePassDX) with two-factor authentication. On Redmi, you can integrate Bitwarden into the autocomplete menu (Settings) β Passwords and security β Auto-filling).