Set Up a Persistent OpenVPN Connection on Android (No Root)

12 min read Step‑by‑step guide to install OpenVPN Connect, import a profile, enable Android’s always‑on VPN and keep the tunnel alive without rooting your device. October 03, 2026 14:00 How to Set Up a Persistent OpenVPN Connection on Android (No Root)

Many Android users need a reliable VPN that stays connected even when the device switches between Wi‑Fi and mobile data. Android’s built‑in Always‑on VPN feature can keep an OpenVPN tunnel alive, but the steps are scattered across the OpenVPN client and the system settings. This tutorial walks you through the entire workflow – from preparing the OpenVPN profile to configuring the OS so the VPN auto‑connects and stays up without any root modifications.

Before you start

  • VPN provider or self‑hosted server: You need an .ovpn configuration file and, if required, a username/password or client certificate.
  • Android 9 (Pie) or newer – the always‑on VPN API is stable from Android 9 onward.
  • Device should be charged above 30 % and connected to a stable Wi‑Fi network for the initial setup.
  • Make a quick backup of important data (e.g., via Google Drive) – the steps do not touch user data, but it’s a good habit.

Step 1 – Install OpenVPN Connect

  1. Open the Google Play Store.
  2. Search for OpenVPN Connect (the official client from OpenVPN Inc.).
  3. Tap Install and wait for the download to finish.
  4. Launch the app and grant the requested permissions (VPN and network access). Android will show a system dialog: "OpenVPN Connect wants to set up a VPN connection". Tap OK.

Why this matters: OpenVPN Connect is the only client that integrates cleanly with Android’s always‑on VPN flag. Third‑party clients may work, but they often lack the required system hook.

Step 2 – Prepare your OpenVPN profile

  1. Copy the .ovpn file to your phone’s internal storage. The easiest way is to email it to yourself and download the attachment, or use a USB cable to copy it to /Download.
  2. If your profile uses separate certificate/key files, place them in the same folder. OpenVPN Connect will look for them relative to the .ovpn file.
  3. Optionally, open the file in a text editor and verify that the auth-user-pass line is present if you need credentials.

Tip: Keep the profile in a dedicated folder (e.g., /Download/OpenVPN) so you can locate it easily later.

Step 3 – Import the profile into OpenVPN Connect

  1. In OpenVPN Connect, tap the + icon or the Import button.
  2. Navigate to the folder where you saved the .ovpn file and select it.
  3. If the profile requires a username/password, you’ll be prompted to enter them. You can also enable the Save credentials toggle for convenience.
  4. Give the connection a friendly name (e.g., "Work VPN") and tap Save.
  5. The new profile appears in the main list. Tap the toggle switch to initiate the first connection.

What you should see: A connection log appears, ending with Initialization Sequence Completed. The status bar shows the OpenVPN icon, confirming an active tunnel.

Step 4 – Enable Android’s Always‑On VPN

Android can force a specific VPN app to start automatically after boot and prevent other apps from bypassing it. Follow these steps:

  1. Open Settings → Network & internet → VPN. (On some OEM skins the path may be Connections > VPN.)
  2. You’ll see a list of installed VPN apps. Tap the gear icon next to OpenVPN Connect.
  3. Toggle Always-on VPN to On.
    • If you also want to block all traffic when the VPN disconnects, enable Block connections without VPN (also called “VPN lockdown”).
  4. Confirm the system dialog that warns about the lockdown mode.

Why this matters: After a reboot, Android will automatically launch OpenVPN Connect and try to reconnect using the last used profile. The lockdown option guarantees that no app can slip out of the tunnel, which is essential for privacy‑focused users.

Step 5 – Verify auto‑connect behavior

  1. Power off the device completely.
  2. Turn it back on. Watch the status bar – the OpenVPN icon should appear within a minute.
  3. Pull down the notification shade and tap the OpenVPN notification to view the connection log. It should show a fresh Initialization Sequence Completed line.
  4. Open a browser and visit https://ipleak.net (or any IP‑checking site). Verify that the displayed IP belongs to your VPN server.

If the VPN does not start automatically, double‑check that the profile you imported is the “default” one (the most recent connection is remembered by the system).

Step 6 – Fine‑tune DNS to avoid leaks

Even with always‑on VPN, Android may still use the network’s DNS servers for queries that happen before the tunnel is fully up. To enforce VPN‑provided DNS:

  1. Open the imported profile in OpenVPN Connect (tap the three‑dot menu → Edit).
  2. Scroll to the Advanced section and enable Use default gateway on remote network (this forces all traffic, including DNS, through the tunnel).
  3. If your provider supplies custom DNS servers, add them under DNS Servers (comma‑separated IPs).
  4. Save the profile and reconnect.

After reconnection, repeat the IP‑leak test and look for the DNS resolver belonging to the VPN.

Step 7 – Reduce battery impact

Keeping a VPN alive 24/7 can drain the battery, especially on older devices. Consider these optimisations:

  • Use UDP instead of TCP in the .ovpn file (change proto tcp to proto udp). UDP is lighter and maintains the tunnel with fewer retransmissions.
  • Enable compression only if the server supports it – it reduces payload size.
  • In Android Settings, disable Battery optimisation for OpenVPN Connect: Settings → Battery → Battery optimisation → All apps → OpenVPN Connect → Don’t optimise. This prevents the OS from throttling the VPN process.
  • If you rarely need the VPN, you can disable the always‑on flag and manually toggle the connection when required.

Troubleshooting common issues

1. Connection fails with TLS handshake failed

  • Check the system date and time – an incorrect clock breaks certificate validation.
  • Verify that the server’s certificate is still valid (not expired).
  • If you use a self‑signed CA, make sure the ca directive in the .ovpn file points to the correct .crt file.

2. DNS leaks despite always‑on VPN

  • Confirm that Block connections without VPN is enabled – it forces DNS through the tunnel.
  • Some OEM skins (e.g., Xiaomi, OnePlus) have aggressive DNS caching. Reboot after enabling the setting.
  • As a fallback, install a DNS‑over‑HTTPS app (e.g., Intra) and set it to use the VPN’s DNS.

3. Android shows “VPN not connected” after a reboot

  • OpenVPN Connect may have been killed by a battery‑optimisation policy. Disable optimisation as described in Step 7.
  • Some devices require a manual “Allow always‑on VPN” permission for the app. Go to Settings → Apps → OpenVPN Connect → Permissions and enable Modify system settings if present.

4. “Block connections without VPN” prevents Wi‑Fi connectivity

  • If the VPN server is unreachable (e.g., network outage), Android will block all traffic. Temporarily disable the lockdown mode or keep a secondary Wi‑Fi network without VPN for emergencies.

Alternative method: Using the built‑in Android VPN client

If you prefer not to install a third‑party app, Android’s native VPNService can import an .ovpn file via the OpenVPN for Android client (by Arne Schwabe). The steps are identical, except the app’s UI differs. The always‑on flag works the same way because it is a system setting, not an app‑specific feature.

Wrapping up

By following the steps above you now have a persistent OpenVPN tunnel that automatically starts after boot, blocks traffic when the VPN drops, and respects your privacy with enforced DNS routing. The configuration is fully reversible – simply toggle the always‑on setting off or uninstall OpenVPN Connect.

Remember to keep your .ovpn file up to date whenever your provider changes server keys or authentication methods. Regularly test the connection after Android updates, as OEM customisations sometimes reset VPN permissions.

User Comments (0)

Add Comment
We'll never share your email with anyone else.