In short: There are two ways to set up a VPN on Xiaomi: through a VPN app (easier and more reliable) or manually through Android's built-in settings using L2TP/IPsec or IKEv2. The main pain point for Xiaomi, Redmi and POCO owners is that MIUI/HyperOS aggressively kills background apps to save battery — causing the VPN to disconnect on its own. The fix: disable battery restrictions, enable autostart, and pin the app. For general LiMP VPN capabilities: LiMP VPN features.
Two ways to set up a VPN on Xiaomi
Xiaomi users have two routes. The first is a VPN app from Google Play: easier to configure, supports modern protocols (WireGuard, IKEv2), and restores the connection automatically. The second is the built-in Android VPN client via system settings: suited for corporate configurations and situations where Google Play is unavailable.
| Method | Difficulty | When to use |
|---|---|---|
| VPN app | Low | Privacy, public Wi-Fi, everyday use |
| Manual (L2TP/IPsec, IKEv2) | Medium | Corporate VPN, no Google Play, specific config required |
Option 1: VPN app (recommended)
Install the official VPN app from Google Play — the quickest and most reliable route for most users. Modern apps support WireGuard and IKEv2, reconnect automatically on network changes, and can run stably in the background once you configure the right permissions (see the battery section below).
Option 2: Manual setup via system settings
The path in both MIUI and HyperOS is the same: Settings → Connection & sharing → VPN → «+». Supported types: L2TP/IPsec PSK, L2TP/IPsec RSA, IKEv2/IPsec. You will need the server address, pre-shared key and account credentials from your VPN provider. Manual profiles do not support WireGuard, but they do work with Android's built-in Always-on VPN mode.
Where to find VPN settings on Xiaomi (MIUI and HyperOS)
On all Xiaomi, Redmi and POCO devices — from budget Redmi models on MIUI 14 to flagship Xiaomi 14 Ultra on HyperOS — the VPN settings are in the same place: Settings → Connection & sharing → VPN. On some regional HyperOS builds the section is labelled Network & internet → VPN, but the navigation logic is identical.
If the VPN option does not appear in the menu, check whether a corporate MDM profile is active (it can hide network settings) or whether the device has ISP-locked firmware. In either case, a standalone VPN app will bypass these restrictions since it manages its own tunnel without relying on the system VPN menu.
Step-by-step: install a VPN app on Xiaomi
The steps below apply to MIUI 12, MIUI 13, MIUI 14 and HyperOS 1/2 on Xiaomi, Redmi and POCO devices. The critical difference from stock Android is step 5 — configuring background permissions. Without it, MIUI will suspend the VPN as soon as the screen turns off.
- Open Google Play and install the VPN app. Search for your VPN provider's official app and tap Install. For LiMP VPN, search for «LiMP VPN».
- Launch the app and log in. Enter your username and password or use the activation code sent to your email after purchase.
- Select a server and connect. For most tasks, the nearest server gives the best latency. Tap the Connect button in the app.
- Allow the VPN connection request. Android will show a system prompt — tap OK. A key icon 🔑 will appear in the status bar once connected.
- Set up background permissions (critical on Xiaomi). Go to Settings → Apps → [VPN app] → Battery saver → No restrictions, and enable Autostart in the same screen. Without this, MIUI/HyperOS will eventually kill the VPN process to save power.
How to add a VPN manually: L2TP/IPsec and IKEv2
Manual configuration is necessary for connecting to a corporate VPN or when your provider supplies configuration parameters rather than an app. For background on what a VPN config file contains: what is a VPN configuration.
- Go to Settings → Connection & sharing → VPN and tap «+».
- Enter a Profile name (e.g. «Work VPN» or «LiMP VPN»).
- Select the Type: L2TP/IPsec PSK (most compatible) or IKEv2/IPsec MSCHAPv2 (more modern and secure, recommended if supported).
- Enter the Server address — the IP or hostname of the VPN server from your provider.
- For L2TP/IPsec, fill in the IPsec pre-shared key provided by your VPN service.
- Tap Save. To connect, tap the profile and enter your VPN username and password.
Note: L2TP/IPsec and IKEv2 are supported by Android's built-in client, but WireGuard and OpenVPN require a dedicated app. The built-in client is ideal for corporate configs where a specific server and protocol are mandated.
Why VPN keeps disconnecting on Xiaomi — and how to fix it
Unexpected VPN disconnections are the most common complaint from Xiaomi users. The cause is not the VPN app itself: MIUI/HyperOS has an aggressive battery manager that forcibly terminates background processes it deems inactive. According to dontkillmyapp.com — an authoritative reference on Android OEM battery behaviour — Xiaomi ranks among the most aggressive manufacturers for background app killing. When MIUI decides your VPN app is idle, it terminates the process and the tunnel drops. You need to manually remove restrictions in three places.
Remove battery saver restrictions
This is the most important change to make. Go to Settings → Apps → [VPN app] → Battery saver and select «No restrictions». By default, MIUI/HyperOS sets third-party apps to «Restricted» or «Optimised» — both modes periodically interrupt background operation. «No restrictions» disables this mechanism for the chosen app only, without affecting battery optimisation of other apps.
On some POCO devices this section is labelled «App management → Battery saver». You can find it quickly by searching for «battery saver» in the system settings search bar. ⚠️ Major OTA updates to MIUI or HyperOS may reset this permission to default — check it again after each significant firmware update.
Enable Autostart
Autostart allows the VPN app to start automatically on boot and resume after being force-stopped by the system. Go to Settings → Apps → [VPN app] → Autostart and toggle it on.
On some MIUI versions the Autostart list is in a separate menu: Settings → Manage apps → Autostart. Find your VPN app in the list and enable it there.
Pin the app in Recents
The «Clear all» button in the Recents panel terminates all unpinned processes, including the VPN. Open the Recents panel, find the VPN app's card, and tap the lock icon 🔒 (or long-press the card and select «Pin»). A pinned app is skipped when the user clears all.
This step is session-only and resets on reboot — it complements rather than replaces the battery saver and autostart settings above. If VPN starts disconnecting again after a MIUI or HyperOS update, check the battery saver and autostart permissions first: major OTA updates sometimes reset them to default.
Always-on VPN and block connections without VPN on Xiaomi
Android supports a system-level Always-on VPN mode — the OS monitors the tunnel and relaunches it automatically on disconnection, without any user action. This is more reliable than manually pinning the app, especially when switching between Wi-Fi and mobile data. It acts as a built-in kill switch: if the tunnel drops, the OS holds all traffic until it is restored. For more on LiMP VPN's privacy features: LiMP VPN features.
How to enable Always-on VPN on Xiaomi:
- Go to Settings → Connection & sharing → VPN.
- Tap the gear icon ⚙️ next to your VPN profile.
- Enable Always-on VPN.
- Optionally enable Block connections without VPN — when the tunnel drops, all internet traffic is blocked until it reconnects.
⚠️ Always-on VPN via system settings works only with manually added profiles (Settings → VPN), not with apps that manage their own tunnel interface (like LiMP VPN). For app-based VPNs, look for the kill switch toggle inside the app settings. Also note that «Block connections without VPN» is incompatible with split tunnelling: if your VPN app has split tunnelling enabled, the system kill switch will block all non-VPN traffic. Use one or the other.
How to verify the VPN is working on Xiaomi
The key icon 🔑 in the status bar confirms the tunnel is active but does not rule out data leaks. Perform a two-step check. For a full guide: LiMP VPN plans.
- External IP address. Open a browser and visit any IP-check service. The IP shown should match your VPN server's address, not your ISP's.
- DNS leak test. Some VPN apps do not route DNS queries through the tunnel, which means your ISP can still see which websites you visit. Run a DNS leak test — the DNS servers listed should belong to the VPN provider, not your mobile carrier.
If the IP has not changed, confirm the VPN app shows a connected status (not just open). If a DNS leak is detected, switch to a different protocol in the app settings or enable the built-in DNS leak protection (enabled by default in LiMP VPN).
Frequently asked questions
Common questions from Xiaomi users setting up a VPN for the first time.
