How to Set Up a Persistent WireGuard VPN on Android (No Root)
13 min read
Step‑by‑step guide to install WireGuard, import a VPN profile, enable always‑on mode and troubleshoot common connection problems on any Android device without rooting.
October 10, 2026 17:00
Many Android users want a fast, modern VPN that stays connected even after a reboot or when switching Wi‑Fi networks, but they don’t want to root their device. WireGuard satisfies the speed and security requirements, and the official WireGuard app works on Android 5.0+ without any special permissions. This tutorial walks you through the entire process – from obtaining a configuration file to making the VPN persistent – and provides troubleshooting tips for the most common hiccups.
Before you start
- Device requirements: Android 5.0 (Lollipop) or newer. Most modern phones (Pixel, Samsung, OnePlus, Xiaomi, etc.) meet this.
- Internet connection: You’ll need Wi‑Fi or mobile data to download the WireGuard app and fetch the VPN configuration.
- VPN credentials: A WireGuard server (self‑hosted or a reputable provider) that supplies a
.conf file or QR code. If you don’t have a server, many commercial VPN services now offer WireGuard endpoints – obtain the configuration from their dashboard.
- Battery considerations: Persistent VPN can increase battery usage slightly because the network interface stays active.
Step 1 – Install the official WireGuard app
- Open the Google Play Store.
- Search for WireGuard (developer: WireGuard LLC).
- Tap Install. The app size is under 10 MB and does not request root.
- Once installed, open the app. You’ll see a clean screen with a + Add Tunnel button at the bottom.
Why this matters: Using the official app guarantees you get the latest security patches and kernel‑level integration that third‑party clients lack.
Step 2 – Obtain or generate a WireGuard configuration
WireGuard works with a simple text file that describes the local interface and the remote peer. A typical configuration looks like this:
[Interface]
PrivateKey = YOUR_PRIVATE_KEY
Address = 10.0.0.2/24
DNS = 1.1.1.1, 8.8.8.8
[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
You have three ways to get a file that matches your situation:
- Self‑hosted server: Follow the official WireGuard guide on your Linux VPS to generate keys and a config file. Export the
.conf and keep it safe.
- Commercial VPN provider: Log into the provider’s portal, enable the WireGuard protocol, and download the configuration. Many providers also display a QR code for easy import.
- Free public servers: Some community projects publish public WireGuard endpoints. Use them only for testing, as they may lack privacy guarantees.
Important: Never share your private key. If you suspect the key is compromised, generate a new configuration on the server side.
Step 3 – Import the configuration into the app
- In the WireGuard app, tap the + Add Tunnel button.
- Select Create from file or archive if you have a
.conf saved on your device, or choose Scan from QR code if your provider gave you a QR image.
- Navigate to the location where you saved the file (e.g.,
Downloads/) and tap it. The app will parse the file and display a summary.
- Give the tunnel a recognizable name, such as
Work VPN or Home WireGuard, then tap Save.
- Toggle the switch next to the tunnel name to activate the connection. A key icon appears in the status bar when the tunnel is up.
What you should see: After a few seconds, the status bar shows a small key, and the app displays “Connected” with the assigned IP address (e.g., 10.0.0.2/24).
Step 4 – Make the VPN persistent (always‑on)
Android’s built‑in VPN settings allow you to keep a tunnel active across reboots and network changes. WireGuard integrates with this feature, but you must enable it manually.
- Open the device Settings app.
- Navigate to Network & internet > VPN. (On some OEM skins the path may be Connections > VPN.)
- You should see an entry named
WireGuard with the tunnel name you created. Tap the gear icon next to it.
- Toggle Always-on VPN. A dialog will appear asking whether to Block connections without VPN. Enable this option if you want all traffic forced through the tunnel – useful for public Wi‑Fi.
- Confirm any system prompts. Android may warn that this will affect battery life; acknowledge it.
Why this matters: Without “always‑on”, the tunnel disconnects when you switch Wi‑Fi networks or reboot. Enabling the setting tells Android to automatically re‑establish the connection whenever a network becomes available.
Step 5 – Verify that the VPN stays active
After enabling always‑on, perform a quick sanity check:
- Turn Wi‑Fi off, then turn it back on. The WireGuard key icon should reappear within a few seconds.
- Reboot the phone. Once the lock screen is unlocked, the key icon should be present without manual activation.
- Open a browser and visit whatismyip.com. The displayed IP should match the public address of your WireGuard server, not your cellular ISP.
If any of these steps fail, move to the troubleshooting section.
Troubleshooting common issues
1. Tunnel fails to connect (stays gray)
- Check server reachability: From a desktop, ping the server’s endpoint (e.g.,
vpn.example.com) on port 51820. If the ping fails, the server may be down or blocked by a firewall.
- Verify the endpoint address: In the WireGuard app, edit the tunnel and confirm the
Endpoint line is correct, including the port.
- Network restrictions: Some mobile carriers block UDP traffic on uncommon ports. Try changing the server’s listening port to 443 (TCP/UDP) and update the config accordingly.
- Permission issue: On Android 10+, the app may need the “Allow background activity” permission. Go to Settings > Apps > WireGuard > Battery & performance > “Allow background activity”.
2. DNS leaks – traffic bypasses the VPN for name resolution
- Ensure the
DNS line in the [Interface] section lists trusted resolvers (e.g., 1.1.1.1 or 9.9.9.9).
- If you enabled “Block connections without VPN” but still see your ISP’s DNS, go to Settings > Network > Private DNS and set it to
dns.google or 1dot1dot1dot1.cloudflare-dns.com. This adds an extra layer of DNS‑over‑TLS.
- Test for leaks with dnsleaktest.com. The only servers shown should be the ones you specified.
3. Battery drains quickly
- WireGuard’s
PersistentKeepalive = 25 sends a keep‑alive packet every 25 seconds. Reducing this value to 60 or removing the line can lower wake‑ups, but may cause the tunnel to drop when the device sleeps.
- Disable “Always‑on” temporarily and see if the drain improves. If it does, consider using the “Block connections without VPN” option only on untrusted networks rather than globally.
- Check Android’s Battery > Battery usage screen for the WireGuard app. If it shows “high usage”, ensure you’re on the latest app version.
4. Certain apps (e.g., banking) refuse to work over VPN
- Some services block traffic from known VPN IP ranges. In such cases, you can create a split‑tunnel by editing
AllowedIPs to exclude the app’s servers. For example, replace 0.0.0.0/0 with 0.0.0.0/1, 128.0.0.0/1 and add a second [Peer] entry that routes only the banking domain through a non‑VPN interface.
- Alternatively, temporarily disable the always‑on setting while using that app, then re‑enable it afterwards.
Advanced optional tweaks
Use a custom DNS‑over‑TLS resolver inside the tunnel
If your WireGuard server runs a DNS resolver (e.g., unbound) that supports DNS‑over‑TLS, you can point the Android DNS line to the server’s internal address (e.g., 10.0.0.1). This ensures DNS queries are encrypted end‑to‑end, even if the device’s private DNS setting is disabled.
Enable “Kill Switch” for specific apps only
Android 9+ introduced per‑app VPN routing via the VpnService.Builder.addAllowedApplication() API, but the WireGuard UI does not expose it directly. Power users can use the adb command to whitelist apps:
adb shell cmd vpn set_allowed_apps com.example.myapp
Replace com.example.myapp with the package name of the app you want to force through the tunnel. This creates a lightweight “kill switch” for that app alone.
Safety and privacy considerations
- Never share your private key. Treat it like a password.
- Keep the WireGuard app updated via the Play Store – updates often contain important security patches.
- If you use a commercial VPN, review their logging policy. WireGuard itself does not log traffic, but the provider’s servers may.
- When traveling, be aware that some countries restrict VPN usage. Always have a backup method (e.g., SSH tunnel) if the primary server is blocked.
Wrap‑up
By following the steps above you now have a fast, modern WireGuard tunnel that automatically reconnects after reboots, network switches, or Wi‑Fi outages. The always‑on setting gives you a true “kill switch” without any rooting, while the troubleshooting section helps you quickly resolve the most common connectivity hiccups. Remember to revisit the configuration whenever you change servers or update your device’s Android version – the UI paths may shift slightly, but the core workflow remains the same.