Skip to content

Samsung Galaxy keeps closing your VPN? The settings that stop it

Galaxy phones put background apps to sleep, VPNs included. Three Samsung settings keep your VPN running, with the menu paths from Samsung's own help.

PryVPN TeamPublished 4 min read
Illustration: a phone settings list with its battery switches set, and a check mark next to the PryVPN seal
Short answer

On a Samsung Galaxy, set the VPN app's battery use to Unrestricted, add it to Never sleeping apps under Background usage limits, and turn on Always-on VPN with Block connections without VPN. Samsung's battery features put apps to sleep in the background; these three settings exempt the VPN and let Android restart it if it ever stops.

Galaxy phones are good at saving battery, and part of how they do it is putting apps to sleep when you're not using them. That's welcome for a game you opened once. It's a problem for a VPN, which has to keep running in the background to protect anything. If your VPN keeps switching itself off on a Samsung, these are the settings to check, in this order.

The menu paths below follow Samsung's own support pages and Android's help, listed in the sources. One UI versions differ slightly: if a name doesn't match, look for the same words nearby.

Why Samsung puts your VPN to sleep

Samsung's Background usage limits sort apps into three lists:

List What Samsung says it does
Sleeping apps Apps that may resume running when you open them again
Deep sleeping apps Apps that never run in the background; they only work when you open them
Never sleeping apps Apps that are never put to sleep, so they can keep working in the background

There's also a switch, Put unused apps to sleep, that moves apps you haven't opened for a while into the sleeping list automatically. A VPN you connect once and leave running can look "unused" to that switch, even though it's working all the time. Power saving mode also limits background apps.

This is on top of Android's own battery saving (Doze and App Standby), which our general guide on a VPN that keeps disconnecting on Android explains.

Step 1: set the VPN's battery use to Unrestricted

  1. Open Settings › Apps and tap your VPN app. (Or touch and hold the app icon and tap App info.)
  2. Tap Battery.
  3. Choose Unrestricted.

The other two options, Optimized and Restricted, let the system limit the app in the background.

Step 2: add the VPN to Never sleeping apps

  1. Open Settings › Battery (on older versions: Settings › Battery and device care › Battery).
  2. Tap Background usage limits.
  3. Tap Never sleeping apps (on newer versions: Never auto sleeping apps), then the + sign.
  4. Select your VPN app and tap Add.
  5. While you're on this screen, open Sleeping apps and Deep sleeping apps and make sure the VPN isn't listed there. If it is, remove it with More options › Remove apps.

Samsung notes that apps on the never-sleeping list can use more battery in the background. For a VPN that's the point: it needs to stay awake to protect you. It doesn't mean the VPN will drain your phone; a light protocol such as WireGuard does very little while idle.

Step 3: turn on Always-on VPN and Block connections without VPN

This is Android's own kill switch, and it's what really closes the gap:

  1. Open Settings › Connections › More connection settings › VPN.
  2. Tap the gear next to your VPN.
  3. Turn on Always-on VPN and Block connections without VPN.

With both on, Android starts the VPN when the phone starts and restarts it if it stops. If it's ever down, your apps get no internet instead of silently using the normal connection. Our Kill Switch help article lists the few exceptions Android itself has.

Check that it worked

  1. Connect the VPN.
  2. Lock the phone and leave it for half an hour or more.
  3. Unlock it: the key icon should still be in the status bar, and the VPN should show as connected.

If it disconnected anyway:

  • Check Power saving. When it's on, the system restricts background apps. Try again with it off, or check whether your version lets you exempt apps.
  • Look at the sleeping lists again. An automatic optimization may have moved the app back.
  • Rule out the network. A hotel or café Wi-Fi that signs you out holds all traffic until you sign in again; see our help article on Wi-Fi login pages.

How PryVPN helps on Samsung

PryVPN notices when the system closed it, rather than you, and tells you once, with the steps for your phone. From Settings › Kill Switch it opens Android's VPN settings for you, so step 3 is two taps away. While disconnected it does no background work at all; while connected it sends a tiny keep-alive packet every 25 to 55 seconds. Our battery help article keeps the current paths for Samsung and other brands.

Frequently asked questions

Does Samsung's "Optimize now" undo these settings?

It checks for apps with high background battery use and can suggest limiting them. If it offers to limit your VPN, decline, or re-check the three settings afterwards.

Will a never-sleeping VPN drain my battery?

It will use some battery, as any VPN does, because it encrypts your traffic. Exempting it from sleep only stops Samsung from closing it; it doesn't add work by itself.

I use a work profile. Does this still apply?

A work profile can be managed by your organization, which may forbid VPNs or set its own. Follow its rules; the settings above apply to your personal profile.

PryVPN is a free WireGuard VPN for Android, including Galaxy phones and tablets. If you'd like to try it, join the beta.

Sources

  1. Samsung: Sleeping apps on your Galaxy device
  2. Samsung: Galaxy battery optimization
  3. Samsung Gulf: How to manage sleeping apps on a Galaxy phone
  4. Android Help: Connect to a virtual private network (VPN) on Android
  5. Android developers: VPN (always-on VPN and blocking connections without VPN)

Spotted a mistake? Write to support@pryvpn.com and we'll fix it and update the date.

Go deeper

Guides and help articles on the same subject.

More from the blog

Try PryVPN during the beta

Free, no card, no activity logs. Join the beta and we'll email you when there's room; PryVPN installs from Google Play.

Free on Google PlayThe full Android app, opening in small groups

Download the app

Downloads open in waves, based on demand. Leave your email and we'll tell you when you can download.

  • Free, no card
  • No activity logs
  • WireGuard encryption
  • Only on Google Play