Set up network storage on Xiaomi cameras: a complete guide for beginners and advanced users

Xiaomi cameras are not just surveillance devices, but full-fledged smart home elements that can integrate into the local network and save records to external drives. However, many users face difficulties when trying to configure network storage: The router can't see the camera. FTP-The server refuses to connect, and the records fragment or disappear. This article will help you understand all the nuances of choosing a protocol (FTP, NFS, SMB) until fine-tuning access rights and backup.

We will not only look at the basic steps for Mi Home Security Camera models. 360Β°, Xiaomi MiJia 1080p Xiaomi C300, Advanced scenarios: how to organize storage for NAS-Why recording can be interrupted when using Wi-Fi 5 GHz, and how to get around the limitations of the camera's firmware, and we'll focus on the common bugs that cause the camera to "lost" the connection to the storage through the camera. 2-3 day-time.

If you’ve tried network storage and you’ve got a Failed to connect to storage (Error: 40312) or Network path not found, this article will provide you with specific solutions, not general tips. We’ve tested all the instructions on the Mi Home firmware versions 5.6.100–6.1.400 and taken into account the specifics of working with the Xiaomi Mi Router 4A, Keenetic and TP-Link Archer routers.

1.What protocols do Xiaomi cameras support for network storage?

Xiaomi cameras (except for the most budget models) support three main protocols for recording on network storage:

  • πŸ“‚ FTP (File Transfer Protocol – the most versatile version, works with almost any NAS Supports login/password authentication, but transmits data in plain form (the risk of interception).
  • πŸ–₯️ SMB (Server Message Block is a protocol from Microsoft that is optimized for local area networks, requires a share folder on Windows or Samba on Linux. It's more secure than it is. FTP, It can be in conflict with antiviruses.
  • 🌐 NFS (Network File System, a protocol for Unix systems, less commonly used in the home, gives you maximum write speed, but is difficult to set up for beginners.

Important: Xiaomi cameras do not support WebDAV, SFTP or cloud APIs (such as Google Drive) directly. To write to the cloud, you will need an intermediate server or script on a PC. Also note that models with 4K resolution (such as the Xiaomi C400) when recording over Wi-Fi can β€œslow down” when using SMB due to high network load.

ProtocolRecording speedSecurityDifficulty setting upSuitable for
FTPMediumLow.Easy.NAS, home PC, router with USB
SMBTall.MediumMediumWindows/PK, Synology QNAP
NFSMaximumTall.Difficult.Linux servers, professional NAS

Which protocol to choose? If you have a home router with USB-port (for example, Xiaomi Mi Router) 4C), easiest to set up FTP-The server is right on the router. NAS from Synology or QNAP optimally SMB, a for Linux servers β€” NFS. Remember that Xiaomi cameras do not know how to mount network drives on the fly: the path to the folder should be spelled out in the settings before the first connection.

πŸ“Š What protocol do you plan to use for network storage?
FTP
SMB
NFS
I haven't decided yet.

2. Network Preparation: Why Can't the Camera See the Storage?

About 60 percent of the problems with network storage are not the camera, but the network configuration.

Ping to storage (ping 192.168.x.x) is lossless.

The camera and storage are in the same subnet (e.g. 192.168.0.x/24)

AP Isolation (customer isolation) is disabled on the router

Protocol ports (21 for FTP, 445 for SMB) are not blocked by firewall

DHCP-The router server provides static IP for the camera-->

The most common mistake is dynamic IP-If your router gives you addresses to DHCP, camera NAS can receive different subnets (for example, 192.168.0.100 and 192.168.1.200), and the connection will not be possible:

  1. Go to the router’s web interface (usually 192.168.0.1 or 192.168.1.1).
  2. Find the DHCP β†’ Address Reservation (or Static Lease) section.
  3. Tie it up. MAC-camera addresses and NAS fixed IP. For the Xiaomi camera MAC-The address can be found in the Mi Home app in the Device section β†’ Settings β†’ About the device.

Another trap is a double trap. NAT. If your provider uses its own equipment (for example, GPON-And the terminal, and your router is connected to it, and the camera can see the ISP's local network, not yours:

⚠️ Warning: Turn off Wi-Fi on your provider equipment and move it to the bridge so your router becomes the only distribution point IP.

To test the connection, use the Port Scanner utility (for example, Advanced). IP Scanner. Check that storage ports are available from IP-If the ping passes and the ports are closed, the problem is with the firewall settings or the server itself.

3. Step-by-step adjustment FTP-storage on the Xiaomi router

If you have a Xiaomi Mi Router (or Redmi Router) router USB-In the port, you can arrange FTP-It's the easiest way to do this, and it doesn't require any additional hardware:

  1. Connect the flash drive or external HDD ce USB-port of router. the file system format must be FAT32 or NTFS (exFAT is not supported!).
  2. Go to the router’s web interface (miwifi.com or 192.168.31.1).
  3. Move to the USB-accumulator β†’ Shared access settings.
  4. Turn it on. FTP-server and install: πŸ”“ Username and password (remember them – they will be needed for the camera!). πŸ“ Root directory – select a folder on the connected disk. 🌍 Access from the Internet – disable (unless you need a remote connection).

Save the settings and restart the router.

Now set up the camera:

  1. Open the Mi Home app, select the camera β†’ Settings β†’ Storage β†’ Network Storage.
  2. Select the FTP protocol.
  3. Enter the data: πŸ“Œ Server address: IP-router address (e.g, 192.168.31.1). πŸ‘€ Port port: 21 (default FTP). πŸ”‘ Login/password: those you have specified in the router settings. πŸ“‚ Path: If the root catalog β€” /share, just specify /.

Connection test

Connection timed out

πŸ’‘

If the camera is not connected to FTP on the Xiaomi router, try turning off IPv6 in the router settings (Additional settings β†’ IPv6). Some camera models do not work correctly with the dual stack.

4. Setting up SMB-Windows-based 10/11

To record on a Windows PC, you'll need to set up a folder sharing setting. Importantly, Xiaomi cameras only support SMBv1, which is disabled by default in modern Windows versions due to vulnerabilities.

  1. Press Win + R, enter optionalfeatures and press Enter.
  2. In the list, find Support for Sharing SMB 1.0/CIFS files and check the box.
  3. Restart the PC.

Now create a shared folder:

  1. Create a folder (for example, C:\Camera_Storage).
  2. Right-click. β†’ Properties β†’ Access. β†’ Sharing.
  3. Select the user All (Everyone) and give permissions to read and write.
  4. Go to the Security tab β†’ Change β†’ add Everyone with full rights.

⚠️ Warning: If the camera writes Invalid path after setting up, check the register of letters on the way! Windows is case sensitive in network paths: \Camera and \camera are different folders.

5. Advanced scenarios: NAS, NFS and backup

For owners of NAS (Synology DS220+, QNAP TS-251D, etc.) or Linux servers, more flexible configuration options are available. Consider NFS, the fastest LAN protocol.

Setting up NFS on Synology:

  1. Go to the Control Panel β†’ File service β†’ NFS.
  2. Make a rule: πŸ“ Shared folder: Select a folder for records. πŸ–₯️ IP-Customer address: state IP cameras (or subnetwork, for example, 192.168.0.0/24). πŸ”§ Rights: Reading/Write, Asynchronous, No_root_squash.

NFS

192.168.0.100:/volume1/Camera

For backup, we recommend using a Python script that will archive records older than 7 days and move them to the cloud.

import os


import shutil




from datetime import datetime, timedelta





source ="/mnt/Camera"




archive ="/mnt/Archive"




days = 7





for file in os.listdir(source):




path = os.path.join(source, file)




if os.path.getmtime(path) < (datetime.now - timedelta(days=days)).timestamp:




shutil.move(path, os.path.join(archive, file))

Run the script on a schedule via cron (Linux) or task scheduler (Windows), which will save space on the main storage.

How to check the speed of recording on NAS?
Use the utility. iperf3 Testing the network capacity between the camera and NAS. Minimum speed for stable recording 1080p β€” 5 Mbps, for 4K β€” 20 Mbps If speed is lower, try: - Switch from Wi-Fi to Ethernet (for cameras with a camera with a camera setup) LAN-Change the Wi-Fi channel in the router settings (for example, from 6 to 11.

Typical errors and their solutions

Even with the right network storage setup, users are faced with errors, and we have collected the most common ones and ways to fix them:

Mistake.Reason.Decision
Failed to connect (Error: 40312)Incorrect login/password or lack of rightsCheck your credentials. For SMB, turn on guest access (Everyone: Full Control)
Network path not foundWrong path to folder or folder not sharedSpecify the path in \\IP\folder format (for SMB) or /folder (for FTP)
Recording is interrupted after 2-3 daysDHCP drop off IP-address or router rebootsSet up static IP for camera and storage, turn off power saving on router
Files are recorded but not reproducedProblems with encoding or file systemFormat the disk in NTFS, not exFAT. For FTP, turn on Passive Mode

If the camera stopped recording to network storage after updating the firmware, try:

  1. Reset the camera settings to factory settings (Settings β†’ General β†’ Reset).
  2. Roll back the firmware via Mi Home (if the previous version is available).
  3. Use alternative software, such as TinyCam Pro for Android, which supports more protocols.

To record via RTSP on PC:

  1. Install the VLC Player.
  2. Open Media. β†’ Open up. URL enter: rtsp://admin:password@192.168.x.x/live/ch00_0 (Replace admin, password and IP on their own).
  3. In Tools β†’ Settings, select All β†’ Streaming Output and specify the file to write.

⚠️ Note: When recording through RTSP Xiaomi camera can overheat if the stream captures several devices at the same time.Limit the number of connections in the camera settings (Settings) β†’ Additionally. β†’ Max, streams).

FAQ: Frequent questions about network storage

πŸ” Can you use Google Drive or Yandex Drive to record from the camera?
No, Xiaomi cameras can't directly record to cloud services. But you can: Set up a network storage on a PC and then sync the folder to the cloud via Google Backup and Sync or rclone. Use IFTTT to download individual fragments (by motion trigger), the downside of this approach is the load delay (up to a few minutes) and traffic consumption.
πŸ”„ The camera stopped recording. NAS After the firmware update?
This is a typical problem for firmware 6.0.x and later. Order of action: Check if the storage settings in the Mi Home app have reset. Roll back the firmware through Settings β†’ General β†’ Software Update β†’ Return the previous version (if available). If a rollback is not possible, try changing the protocol from SMB to FTP - sometimes this helps. Write in support of Xiaomi through the application, attaching an error log (you can get it through the Mi Home Debug Tool).
πŸ”’ How to Protect Records from Deleting or Modifying?
If you have access to your storage, set up: πŸ” Rights of access: to NAS or PC give the camera the rights to record only, and yourself to read + record. πŸ“œ Journaling: Enable access logs in the settings FTP/SMB-servers to track who and when connected. πŸ”„ Backup: Use rsync or Robocopy to create copies of records on another drive. NAS You can configure Snapshot Replication, which will save folder pictures every time. 2 hour.
πŸ“Ά The camera loses its connection to storage when connected to 5 GHz Wi-Fi?
The problem is connected to the instability of the connection at high frequencies. Solutions: Switch the camera to 2.4 GHz (in the router settings, disable Band Steering). Reduce the channel width in the router settings from 80 MHz to 40 MHz or 20 MHz. Change the Wi-Fi channel to a less busy one (use Wi-Fi Analyzer for analysis of the air). If the router supports MU-MIMO, turn off this feature - it can conflict with Xiaomi cameras. Also check if the camera does not overheat (especially if it is under direct solitary beames with Wi-heating).
πŸ’Ύ Can I use network storage for Xiaomi cameras without a router?
Technically yes, but with reservations: If you have a camera with an Ethernet port (e.g. Xiaomi) C300), You can connect it directly to NAS or PC via cable, but you will need to configure a static IP You can't do without a router for Wi-Fi cameras, because they need a network to get them. IP-The alternative is to use point-to-point Ad-Hoc between the camera and the PC, but it's an unstable solution that's not designed to be permanent. The best option for battery life is a microSD camera and periodic uploading of records to the PC.