How to add VPN toggle to Control Center (simple workaround)

Hi everyone, I want to share with you a simple way to create a shortcut for VPN on iOS that you can access from the control center. This works with any VPN service that supports actions in the Shortcuts app (for example, Surfshark does). Here are the steps:

  1. Make sure you have the VPN app installed and connected at least once. This will enable a hidden VPN tile in the settings app that you can use to toggle the VPN on and off.
  2. Create a new custom Focus (I named it VPN). You don’t need to configure anything, just create it.
  3. Create a new automation triggered by the start of the VPN Focus shortcut and another one triggered by the stop of the VPN Focus. These automations will control the activation of the VPN.
  4. In each automation, add the corresponding action for the VPN (Surfshark has connect action and disconnect action)

Now you can tap the Focus icon in your control center to find the VPN one you created and toggle it on or off. You can also use Siri to activate or deactivate the Full Immersion shortcut.

I hope this helps someone who wants a quick way to access their VPN without opening the app every time. Let me know if you have any questions or suggestions.

Ios 18 added this feature to control center

It’s not control center, but you can add shortcuts to the widgets page if you scroll left from the Notification Center. I use focuses for handling notifications (I’m not getting work email notifications after hours), so I don’t want to tie the vpn to a focus. So I created a shortcut that will toggle the vpn and added it to whatever Apple calls that screen with widgets.

Side note but I use WireGuard and only really need a vpn if I’m traveling or connecting to a public WiFi network. You can set WireGuard to automatically activate based on the wireless SSID you’re connected to. I currently have it set to activate whenever I’m on a WiFi network that’s not my own. (HIGHLY discourage connecting to a public WiFi without a vpn) If you have a computer that is always on at home, it’s not hard to set up. Also allows for your favorite streaming services while traveling.

Second side note: you don’t need WireGuard to do this. You can create an iPhone automation that triggers based on WiFi connection and will call a shortcut. This is probably the better option because disabling the vpn is a pita when WireGuard has it on automatically.

Trying to do this on an iPad, but you lost me at " Create a new automation triggered by the start of the VPN Focus shortcut and another one triggered by the stop of the VPN Focus. These automations will control the activation of the VPN"

I found the shortcuts app but I’m not sure how to create an automation triggered by the start of the VPN Focus shortcut.

I’m an idiot.

I can’t believe this is possible in Apple TV’s control center and not in iOS, Apple is disappointing…

Or you can just create a shortcut action to turn a vpn on, another one to turn it off, and add them to the Notification Center or to the Control Center (in iOS18 and iPadOS18).

It looks like you might be looking for help or support, in which case we recommend you search for your issue and check the Support FAQs. We review submissions for quality, so basic support issues may be removed.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

Nice work, sadly I use the built in. they need to add the toggle back in/like android in the action center.

Genius. Thanks! First time actually fiddling with these settings and i’m glad they come in handy.

Just read this … my only thoughts are. If wanting to use Do Not Disturb with the VPN remaining active, or would have to be done manually since the option being described above is creating a shortcut via one of the Focus modes.

Thanku so much works like charm

I was wondering that EXACTLY in this moment. Thank you!

They added it but it doesn’t work. You click it and it doesn’t do anything

After some time I figured it out, hope it’s still relevant for you (or other ppl).

Open the shortcuts app, tap on the + in the top right corner and then ‘Add Action’, in the search bar type VPN and it should show you ‘Set VPN’, tap that.

Then select the blue marked ‘connect’ and change that to Toggle (at least that’s what I needed, to toggle the VPN connection when I activate/deactivate the designated focus mode) and select the VPN profile (in my case it’s a WireGuard VPN to my home). Tap on done.

You can rename the shortcut by holding on the shortcut and select ‘rename’.

Now go to ‘automation’ in the bottom middle, tap on the + again and search for ‘focus’. Select the focus you set up earlier that you wanna use for the VPN, select both ‘when turning on’ and ‘when turning off’, run immediately, hit next.

Select the VPN shortcut you just created.

That should be it, working for me like a charm. Just make sure the focus doesn’t block any incoming calls, notifications etc

Hope that helps :slight_smile:

It does work, it turns the VPN on, just the wrong one(for me). I want the “Personal VPN” on but when I press the VPN button, it turns on the other one labeled “VPN Status”.

There is no VPN in shortcuts, can’t seem to find it. https://i.imgur.com/tZjuXZe.jpeg

Same issue, have you found a way to change it so that the control center toggle would turn on a different VPN?

YES!!! I have the OPPOSITE problem: it’s toggling on my “personal” but I want it to toggle my work VPN. WHY THE HELL ADD THE OPTION if you can’t even choose which VPN it controls?? It doesn’t even TELL you the name of the VPN that it toggles from within the control center…you just have to hold your breath and pray that it toggles the correct one. It’s so, so stupid. I’m glad they finally got a baby step closer to getting a practical Control Center VPN toggle but good god. Why not take the extra 8-16 programming hours to at least show the NAME of the vpn it’s toggling???