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:
- Open your browser and type in the address bar 192.168.31.1 (or miwifi.com).
- Sign in under your Xiaomi account (login and password from the router).
- Go to the section Additional settings β System tools β Reboot.
- 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:
- 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).
- 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.
- 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.
- 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:
- Connect to the router via SSH (use 192.168.31.1 and port 22).
- Install cron (if not): opkg update opkg install cron
- 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.
- 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
fiHow to check the current load on the router?
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 up | Why 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 packets | Network β IPv6 β Disconnect |
| Bandwidth limitation for torrents | Prevents overloading of the channel with one device | QOS β Rules β Add a limit for ports 6881β6889 |
| Update DNS-server | Accelerates the resolution of domain names after rebooting | Network β DNS β Specify 1.1.1.1 and 8.8.8.8 |
| Enable the "Fast Roaming" (Fast Roaming) | Reduces Wi-Fi recovery time after reboot | Wi-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)