Setup automatic reboot of the Xiaomi router: 3 working methods

Xiaomi routers are some of the most popular home networking devices because of their combination of price, performance and functionality, but even the most reliable models eventually start to slow down, speed drops, the connection breaks, and the connection breaks. IP-And most of the time, it's a simple reboot, but it's tedious to do it manually every day. Fortunately, Mi Wi-Fi and OpenWRT have tools for automatic rebooting on a schedule -- you just have to know where to look.

In this article, we will discuss all the available ways to configure autoreboots, from the standard Mi Wi-Fi interface to advanced methods via Telnet and SSH. Also explain why regular reboots are useful for network stability, and warn against typical errors that can lead to the opposite effect. If your Xiaomi Router 4A, AX3600 or RA75 became β€œglut” – this instruction will help to return it to its previous speed without unnecessary hass.

Why do you need an automatic router reboot?

Many users mistakenly believe that the router should run for years without turning off, and in practice, even top Xiaomi models (such as the AX9000 or BE7000) accumulate errors in RAM over time, especially if:

  • πŸ“Ά More than 20 devices are connected at the same time (smartphones, smart equipment, IoT gadgets).
  • πŸ”„ Often used torrents, online games or video broadcasts (high traffic overloads the processor).
  • πŸ”Œ The router operates in unstable power supply (voltage surges spoil the cache).
  • πŸ› οΈ The firmware has not been updated for a long time (bugs in the software accumulate over time).

Regularly rebooting cleans the DNS cache, resets routing timetables, and frees up RAM. According to tests from SmallNetBuilder, even budget routers after a reboot show a 15-30% increase in speed due to resource release, with the optimal interval for home networks every 1-3 days, depending on the load.

⚠️ Note: If the router reboots spontaneously several times an hour, the problem is not in the settings, but in hardware malfunction (overheating, faulty power supply) or conflict. IP-In this case, auto-reset will only make things worse.

Method 1: Configure via the Mi Wi-Fi web interface (for standard firmware)

The easiest method is to use the built-in feature in the router's web interface, which is suitable for most models on standard Mi Wi-Fi firmware (e.g. Router 4C, 4A Gigabit, AX1800).

To set up the auto-reboot:

  1. Open your browser and type in the address bar 192.168.31.1 (or miwifi.com).
  2. Sign in under your Xiaomi account (login and password from the router).
  3. Go to the section Additional settings β†’ System tools β†’ Reboot.
  4. Activate Auto-Reboot and set the time (e.g., 03:00 when the network is least loaded).

Make sure the reboot time doesn’t match peak load (e.g., in the evening)

Record current Wi-Fi settings (network name and password) in case of reset

Disable Parental Control during the reboot (if used)

Check that the router is connected to the UPS (at voltage surges)

-->

If your interface does not have the item β€œAutomatic reboot”, then:

  • πŸ”„ You have outdated firmware (update it in the System Tools section). β†’ Update of the PO).
  • πŸ› οΈ The router runs on custom firmware (e.g. Padavan or OpenWRT) – use Method 2 or 3.
  • πŸ“± The model does not support function (relevant for very old devices like the Mi Router). 1S).

Standard Mi Wi-Fi|Padavan|OpenWRT|Other custom |I don't know-->

Method 2: Auto-Reboot over Telnet (for advanced users)

If the web interface doesn't provide the right options, you can use Telnet, a remote device management protocol that works on most Xiaomi routers, but requires you to enable command line access.

Before starting, make sure that:

  • πŸ”Œ The router is connected to the network via cable (Wi-Fi can be turned off during setting up).
  • πŸ–₯️ PuTTY (for Windows) or Terminal (for Windows) is installed on your computer. macOS/Linux).
  • πŸ”‘ You have administrator rights on the router.

Step-by-step:

  1. Turn on Telnet on the router: 1. Go to Additional settings β†’ Developer β†’ Access by Telnet. 2. Activate the switch and write down the login / password (by default - root and password from the web interface).
  2. Connect to the router via PuTTY: 1. In the "Host Name" field, type 192.168.31.1. 2. Select the Telnet protocol and press Open. 3. Enter the username and password.
  3. Create a task for auto-reboot: vi /etc/crontabs/root Add a line (example to reboot every day at 3:00): 0 3* reboot Save changes: press Esc, type:wq and press Enter.
  4. Reboot the router with the command: reboot

πŸ’‘

If the router does not restart after saving crontab, check the file rights with the command chmod 644 /etc/crontabs/root and restart the cron service: /etc/init.d/cron restart.

To cancel the auto-reboot, simply delete the added line from the /etc/crontabs/root file.

⚠️ Warning: Incorrectly editing files via Telnet may result in loss of access to the router. If the device stops responding after the changes, reset with the Reset button (hold 10 seconds).

Method 3: SSH configure (for OpenWRT/Padavan firmware)

If your router runs on custom firmware (OpenWRT, Padavan or LEDE), it is more convenient to use SSH, a protected analog of Telnet, for auto-reboot, which is more flexible, as it allows you to adjust not only the time, but also the reboot conditions (for example, when you have a high load on the CPU).

Algorithm of action:

  1. Connect to the router via SSH (use 192.168.31.1 and port 22).
  2. Install cron (if not): opkg update opkg install cron
  3. Open the crontab file: crontab -e Add a line to reboot (example for Padavan): 0 4 1,3,5 /sbin/reboot This command will reboot the router to 4:00 Mondays, Wednesdays and Fridays.
  4. Activate cron: /etc/init.d/cron enable /etc/init.d/cron start

You can also use the built-in ucron scheduler or scripts in /etc/rc.local to firmware OpenWRT, for example, to reboot the router when the CPU is above 90%:

#!/bin/sh


THRESHOLD=90




LOAD=$(awk '{print $1}' /proc/loadavg | cut -d. -f1)




if [ "$LOAD" -gt "$THRESHOLD" ]; then




reboot




fi

How to check the current load on the router?
To find out how hard the processor is loading, connect to SSH and type in the command: top or for short statistics: uptime In the first column, you will see a load average β€” three numbers showing the average load in 1, 5 and 15 minutes. If the value exceeds the number of CPU cores (for example, 4.0 for a 4-core chip), the router is overloaded.

Additional settings: Network optimization before restarting

Autoreboot solves many problems, but you can make it more effective with additional settings. Here's what you should do before you activate your schedule:

Setting upWhy do you need it?How to turn it on
IPv6 Disabled (if not used)Reduces the load on the processor by reducing the number of processed packetsNetwork β†’ IPv6 β†’ Disconnect
Bandwidth limitation for torrentsPrevents overloading of the channel with one deviceQOS β†’ Rules β†’ Add a limit for ports 6881–6889
Update DNS-serverAccelerates the resolution of domain names after rebootingNetwork β†’ DNS β†’ Specify 1.1.1.1 and 8.8.8.8
Enable the "Fast Roaming" (Fast Roaming)Reduces Wi-Fi recovery time after rebootWi-Fi β†’ Additional β†’ Enable 802.11r

If your router supports a guest network, set it apart from the main network, allowing devices like smart lamps or cameras to stay connected even when the main network is rebooted.

πŸ’‘

The combination of auto-reboot with DNS and QoS optimizations gives the maximum increase in network stability – up to 40% compared to the β€œnaked” reboot.

Common Mistakes and How to Avoid Them

If you don't set up the autoreboot correctly, you can have the opposite effect: instead of running smoothly, you get permanent connection breaks. Here are the most common errors and their solutions:

  • ⏰ Reboot at peak times. If the router is needed in the evening when everyone is watching Netflix, users will notice the lags. Solution: choose a time with minimal load (night or early morning).
  • πŸ”„ Too often reboots, hourly rebukes wear out the router's flash memory, solution: optimal intervals - once every 1-3 days.
  • πŸ”Œ No UPS: If the lights are turned off during the restart, the router can damage the file system.
  • πŸ“‘ Unsaved Wi-Fi settings. After a reboot, some models reset the network name (SSID) Solution: export the config through System Tools β†’ Backup.

Another common problem is that the router doesn't reboot on schedule, and the reasons may be:

  • πŸ› οΈ Cron service is not running (check with ps command) | grep cron).
  • ⏳ Time on the router is lost (synchronize through the NTP c System tools β†’ Time).
  • πŸ”’ File. /etc/crontabs/root have incorrect rights (should be) 644).

Alternative methods: reboot by external triggers

If the standard methods don't work, you can set up a reboot based on external events, such as:

  • πŸ“± Through the Mi Wi-Fi app. Open the app and select your router. Go to Tools. β†’ Reboot. Click Set the schedule (not available on all models).

Alice.

Google Assistant

).

This requires integrating the router with Mi Home and setting a routine such as β€œIf it’s 03:00, then reboot the router.”

Through a smart socket.

Connect the router to a timer outlet (such as Xiaomi Smart Plug) and set up a schedule to turn off/on power. Minus: this method incorrectly terminates the router, which can damage the file system.

For advanced users, there is another option, a Python script that will send a reboot command over HTTP-API.

import requests


from datetime import datetime





ROUTER_IP = "192.168.31.1"




USERNAME = "admin"




PASSWORD = "your_password"





def reboot_router():




url = f"http://{ROUTER_IP}/cgi-bin/luci/;stok=/api/xqsystem/reboot"




response = requests.post(url, auth=(USERNAME, PASSWORD))




if response.status_code == 200:




print(f) "Router rebooted to {datetime.now()}"




else:




print("Reset error")




Run a script on a schedule through the task scheduler (Windows) or cron (Linux)

FAQ: Frequent questions about auto-reboot of Xiaomi router

Can you set up a auto-reboot on a Xiaomi router without access to Telnet/SSH?
Yes, if your model supports this feature in the web interface (see Method 1). Older routers (such as Mi Router 3) may need to update the firmware. If there is no auto-reboot option on the menu, only a manual reboot or smart socket (but this is less reliable) remains.
How do I know if the router is overheating and if it needs a frequent reboot?
Connect to the SSH and type in the command: cat /proc/cpuinfo | grep "temperature" or (for OpenWRT): vcgencmd measure_temp Normal temperature - up to 60–70Β°C. If the value is higher 80Β°C, the router needs additional cooling (such as a fan) or more frequent reboots.
Will traffic statistics be reset after the autorestart?
Yes, most Xiaomi routers, the traffic counters (in the Statistics section) are reset after rebooting. If you want to keep track of your Internet consumption, use external programs like GlassWire or set up logs to an external server.
Can you set up a reboot for only 5 GHz network, leaving 2.4 GHz running?
No, the router restarts completely - you can't selectively reboot just one frequency. However, you can disable 5 GHz network while rebooting via script (for example, in crontab add a command to disable before reboot and turn on after). Example for OpenWRT: 0 3 * wifi down radio1 & & & reboot @reboot sleep 60 & & & wifi up radio1
Why did the router start laying even harder after setting up the auto-reboot?
Probable reasons: Too short a reboot interval (e.g. every hour) - the router does not have time to stabilize; conflict with other tasks in cron (check logread | grep cron); memory shortage due to background processes (remove unnecessary services through System β†’ Startup); Solution: increase the interval to 1 time in 2-3 days and turn off unnecessary services.