NFS (Network File System is a protocol that allows you to connect remote folders as local drives. On Xiaomi 11 Lite (models) NE 5G and 4G) setup NFS It's possible without superuser rights, but it requires the right server and client configuration, and many users have problems mounting network folders because of the features of the network. MIUI or incorrect connection parameters.
In this article, we will discuss three ways to connect. NFS Xiaomi 11 Lite: through standard Android tools, using file manager applications and through Termux for advanced users, especially focusing on solving common errors (for example, Permission denied or Mount failed), as well as optimizing data transfer speeds. If you want to access the files on NAS-server, home PC or even Raspberry Pi β this guide will help you configure everything from scratch.
NFS It is often confused with Samba (SMB), But these protocols have key differences. NFS It is better suited to Linux environments and provides faster speed when working with small files, while SMB versatile Windows/macOS. Xiaomi. 11 Both protocols work, but Lite does. NFS It requires additional adjustments due to limitations MIUI network-protocol.
Before proceeding, make sure that:
- π‘ Your router supports static IP-Addresses (or you have set up reservations) DHCP device).
- π₯οΈ On the server (PC)/NAS) set up NFS-server (e.g. nfs-kernel server on Linux).
- π± Developer mode is enabled on your smartphone (if you plan to use Termux).
1. Preparation of the server: setting up NFS PC-only NAS
Before connecting from a smartphone, you need to configure NFS-The server on the device you're connecting to, let's look at two options: Linux (Ubuntu/Debian) Windows 10/11 (through WSL third-party).
Install the package on Linux NFS-server:
sudo apt update && sudo apt install nfs-kernel-serverThen edit the configuration file. /etc/exports, I added a line for a shared folder:
/path/to/folder 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)Where:
- 192.168.1.0/24 β Subnet your local network (replace your network with your own).
- rw is the permission to read and write.
- no_root_squash β Maintain root rights (required for some applications).
After saving the file, restart the server:
sudo exportfs -a && sudo systemctl restart nfs-kernel-serverFor Windows, it is the easiest to use WSL 2 fitted NFS-server or third-party solutions such as hanewin NFS Server. WSL commands are similar to Linux, but you will need additional firewall configuration:
New-NetFirewallRule -DisplayName "NFS-Portmap" -Direction Inbound -Protocol TCP -LocalPort 111 -Action Allow
New-NetFirewallRule -DisplayName "NFS-Mountd" -Direction Inbound -Protocol TCP -LocalPort 2049 -Action Allowβ οΈ Note: If you use Xiaomi 11 Lite on a public network (such as a cafe or office), never open it. NFS-port (2049) to external access. This protocol is not encrypted, and data can be intercepted. NFS Only on trusted local networks.
2. Connection NFS File Manager (without root)
The easiest way to connect to NFS-Networks on Xiaomi 11 Lite - use a file manager with support for network protocols:
- π Solid Explorer (paid, but with trial period).
- ποΈ FX File Explorer (free, but requires manual settings).
- π MiXplorer (free but difficult to set up).
Letβs look at the example of Solid Explorer:
- Open the application and go to the Network section β Add storage β NFS.
- Enter server data: Server address: IP or hostname (for example, 192.168.1.100). Path to folder: for example, /mnt/nfs_share. Username: Leave blank (unless authentication is configured).
Connect
If the connection fails, check:
- π Network access: Does Ping go to the server? (ping 192.168.1.100 in Termux).
- π Access rights: On the server, the folder is exported with the rw parameter?
- π‘ Ports: Port 2049 is open on the server and not blocked by a firewall?
Server is enabled and available over the network
The folder is exported with the correct rights (rw)
Wi-Fi (not mobile data) is enabled on the smartphone
Port 2049 is not blocked by a router or firewall-->
Manual mounting NFS via Termux (for advanced applications)
If file managers are not suitable (for example, due to limitations) MIUI), fit NFS-A folder through Termux, a Linux terminal emulator for Android, requires basic command line knowledge, but gives you more control.
Steps to set up:
- Install Termux from F-Droid (the version from Google Play is outdated).
- Update packages and install nfs-utils: pkg update & & pkg upgrade -y pkg install nfs-utils
- Create a folder for mounting: mkdir ~/nfs_mount
- mount the network folder: mount -t nfs 192.168.1.100:/path/to/folder ~/nfs_mount -o soft,intr,rsize=8192,wsize=8192 Parameters rsize/wsize Increase transmission speeds for slow networks.
To unmount the folder, use:
umount ~/nfs_mountβ οΈ Note: When mounting via Termux, the folder will only be accessible inside the terminal. For files to be displayed in standard applications (such as a gallery), you will need to be bound to the terminal. /sdcard lin -s or use Termux:Tasker to automatically mount at launch.
π‘
If Termux issues a mount: Operation not allowed error, try using proot-distro to create an isolated Linux environment with full rights.
Automatic mounting NFS when you launch a smartphone
So you don't mount. NFS-manually each time, set up automatic launch via Tasker or Termux:Boot.
Method 1: Termux:Boot (requires Termux)
- Install Termux:Boot from F-Droid.
- Create a script. ~/nfs_mount.sh contents: #!/data/data/com.termux/files/usr/bin/sh mount -t nfs 192.168.1.100:/path/to/folder ~/nfs_mount -o soft,intr,rsize=8192,wsize=8192
- Make the script executable: chmod +x ~/nfs_mount.sh
- Move it to the autoload folder: cp ~/nfs_mount.sh ~/.termux/boot/
Method 2: Tasker (without Termux)
- Install Tasker and the Termux:Tasker plugin.
- Create a task with the action Run the command and type: mount -t nfs 192.168.1.100:/path/to/folder /sdcard/nfs_mount
- Set up the trigger for the event The device is loaded.
For stable operation of auto-mounting:
- π Use static. IP for smartphone in router settings.
- β±οΈ Add a delay of 10-15 seconds before mounting (to allow Wi-Fi to connect).
- π Check what's on the server. NFS run-in --no-tcp (if you use UDP).
π‘
Automating through Termux:Boot only works if Termux is allowed to auto-run in the settings MIUI (Settings β Annexes β Auto-start).
5. Speed optimization and error elimination
NFS It can run slowly on Xiaomi 11 Lite due to processor limitations 732G) Or network settings. Here's how to speed up data transfer:
Mounting parameters for speed:
| Parameter | Meaning | Description |
|---|---|---|
| rsize | 32768 | Read block size (increases speed for large files) |
| wsize | 32768 | The size of the recording block. |
| timeo | 14 | Timeout of server response (reduce if the network is stable). |
| intr | β | Allows interruption of operations (useful for slow networks). |
Example of a team with optimized parameters:
mount -t nfs 192.168.1.100:/path/to/folder ~/nfs_mount -o rsize=32768,wsize=32768,timeo=14,intr,softTypical errors and decisions:
- π« Permission denied: Check export rights on the server (rw,no_root_squash). Make sure your smartphone does not block access. MIUI Optimizations (disable in the developer settings).
- π Connection timed out: Check that the server and smartphone are in the same subnet. VPN or proxy on a smartphone.
- π Slow gear: Try replacing tcp with udp in mounting settings. rsize/wsize before 8192 for unstable networks.
How to check the speed NFS Xiaomi 11 Lite?
Alternatives NFS: When to use Samba or WebDAV
NFS β Not always the best choice for Xiaomi 11 Lite. Letβs look at alternatives depending on the task:
Samba (SMB):
- β Easy to set up (supported by most file managers).
- β Works with Windows without additional settings.
- β Slower. NFS When working with a large number of small files.
WebDAV:
- β Encrypts through HTTPS (Safe for public networks).
- β Supported by cloud services (Nextcloud, OwnCloud).
- β High load on the smartphone processor during transfer.
FTP/SFTP:
- β It works (even on older devices).
- β No caching β every access to a file requires a new request.
If your goal is streaming video or backup, NFS It's better to use files from Windows or public networks. SMB WebDAV.
7 Security: How to protect NFS-connection
NFS It doesn't encrypt traffic by default, so it's not recommended to use it on unsecured networks:
Methods of protection:
- π VPN: Set up WireGuard or OpenVPN on your router/server and connect to the NFS only VPN.
- π‘οΈ Firewall: Restrict access to port 2049 to only IP-addresses of your local network.
- π Authentication: Use the SEC=krb5 sec=krb5p Kerberos authentication (requires configuration) KDC-server).
Example of mounting through VPN:
- Connect to VPN smartphone.
- Mount it. NFS, using VPN-IP servers (e.g. 10.8.0.1).
NFS via mobile Internet (4G/5G) It is highly recommended, even with VPN The speed will be low, and the risk of interception remains. + TLS or syncthing.