unbraid

Guides · Published

Tailscale and WireGuard at the same time on Android

To use Tailscale and WireGuard at the same time on Android, first check what your WireGuard config is for. A config that reaches only your home subnet needs a different setup from one that sends an app’s internet traffic through a WireGuard server.

The WireGuard app and the Tailscale app normally can’t both be connected in one profile, because Android stops the first VPN when the second connects. You can move the WireGuard part into your tailnet, or use one app that runs both connections.

Why the two apps switch each other off

Android allows one active VPN service per user or profile, and starting another stops the one that was running. Without root, the WireGuard app builds its tunnel on that service, and so does the Tailscale app. Tailscale’s page on other VPNs names the same limit for Android and iOS.

Changing AllowedIPs doesn’t get around it. Leaving Tailscale’s range, 100.64.0.0/10, out of the WireGuard config keeps those addresses out of the tunnel. It doesn’t connect the phone to your tailnet, because the Tailscale app is off while WireGuard is on.

Why Android runs one VPN at a time has the details, including what a work profile changes.

Tailscale has no WireGuard config file

Tailscale is built on WireGuard, but its apps don’t import a standard WireGuard .conf. Tailscale manages the keys for you: each device makes its own private key, and Tailscale passes the public keys around. A feature request for config import has been open since January 2022.

We found no export in Tailscale’s documentation either, so there is no .conf that the WireGuard app could use to join your tailnet. Devices in a tailnet find each other through Tailscale’s coordination server, and a plain WireGuard client has no part in that.

Check what your WireGuard config is for

Open the .conf in a text editor and read the AllowedIPs line under [Peer]. It lists the destination addresses sent to that peer, and the source addresses accepted from it.

A config for a home network:

[Interface]
PrivateKey = (your key)
Address = 10.8.0.2/32

[Peer]
PublicKey = (router's key)
Endpoint = home.example.net:51820
AllowedIPs = 192.168.1.0/24

A config for an internet exit:

[Interface]
PrivateKey = (your key)
Address = 10.66.0.2/32
DNS = 10.66.0.1

[Peer]
PublicKey = (server's key)
Endpoint = 203.0.113.10:51820
AllowedIPs = 0.0.0.0/0, ::/0

A config that lists only private ranges, such as 192.168.x.x, 10.x.x.x or 172.16.x.x to 172.31.x.x, usually gives access to one network, like your home or office. A config with 0.0.0.0/0 sends every IPv4 destination through the tunnel. Some exit configs use several ranges that add up to the same thing.

VPN providers commonly hand out the second kind. A config from your own router can be either, depending on what you chose when you made it. WireGuard AllowedIPs explained covers how the ranges are matched.

Ways to get both

Setup WireGuard and tailnet together What it needs
WireGuard app and Tailscale app, same profile Normally no Switching between them
The two apps in separate profiles Both stay on, but each app uses only its own profile’s VPN A work profile or Private Space
A Tailscale subnet router or exit node in place of the tunnel Yes, with only the Tailscale app A device at home or a server that stays on
A tailnet device that forwards into the WireGuard tunnel Yes, with only the Tailscale app A machine that stays on, with routing set up
One VPN app that runs both Yes The .conf and a tailnet

Use a Tailscale subnet router or exit node

If the config only reaches your home network, a subnet router can replace it. That is a device at home with Tailscale installed, which advertises your home range to the tailnet. You turn on IP forwarding on it and approve the route in the admin console. The Tailscale app on Android picks up the route on its own.

If the config is an internet exit on a server you run, the same server can be a Tailscale exit node. Advertise it as one, approve it in the admin console, then select it as the exit node in the Tailscale app on the phone.

Forward from your tailnet into the tunnel

Sometimes you can’t install Tailscale on the WireGuard server, for example at a VPN provider or on a locked-down router. Another machine you control can then run Tailscale and the WireGuard tunnel together and pass traffic from one to the other. TailGuard is a container made for this, and people also set it up by hand with routing rules. The machine has to stay on, and everything for the tunnel passes through it.

One VPN app that runs both

An Android VPN app can manage several tunnels behind its one VPN service. sing-box’s configuration format has a WireGuard endpoint and a Tailscale endpoint in builds that include Tailscale support, and you write the JSON profile yourself. unbraid is built on sing-box and does it from settings screens.

WireGuard and Tailscale in unbraid

unbraid is a VPN client that imports WireGuard configs and has a Tailscale client built in. You don’t need the WireGuard app or the Tailscale app for this, and connecting either one would stop unbraid.

A config that only reaches your home network

  1. Open Settings, Local & home access, and tap Home WireGuard tunnel.
  2. Pick the .conf file. The row then shows Home and the server’s address.

Apps that go through unbraid now reach the private ranges in that config through the tunnel. Their internet traffic keeps using their own route. unbraid holds one home tunnel, and importing another file replaces it.

unbraid takes only the private IPv4 ranges from AllowedIPs here: anything inside 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 or 100.64.0.0/10. If the file has none, as with 0.0.0.0/0, it falls back to the private ranges on the Address line, which usually aren’t your home network. Edit AllowedIPs to your home range before you import.

The home tunnel doesn’t use the DNS line of the config. If a device’s name doesn’t resolve, use its IP address.

If you add a home-only config as a server instead, unbraid refuses it with This config only reaches 192.168.1.0/24; import it under Settings → Home instead.

A config that is an internet exit

  1. Go to Settings, Providers & servers, Add connection, WireGuard or OpenVPN file, and pick the .conf. Keep or change the name under Name this server and tap Import. On a new installation, Import a config file under Choose your VPN does the same.
  2. In Routes, open the default route, tap Change location, and choose the server under Own servers. To use it for some apps only, tap +, then Route, pick the server, and assign those apps in Apps.

The file needs exactly one [Peer], an IPv4 address, and AllowedIPs that covers all of IPv4. Multiple WireGuard tunnels on Android lists the other import rules.

Join your tailnet

Open Settings, Tailscale, and turn on Reach your tailnet. Use Sign in with your browser or Sign in with an auth key. If you save an auth key while unbraid is off, it’s used the next time you connect. unbraid joins as its own device, so your tailnet may ask an admin to approve it, and its access rules have to allow the phone.

To reach devices behind a Tailscale subnet router, add its private IPv4 ranges under Settings, Local & home access, Advanced settings, Home subnets through Tailscale. Tailscale and a VPN at the same time has the full steps, including Headscale.

Then connect with the power button in Routes, and approve Android’s VPN request if it appears. If the WireGuard app or the Tailscale app is set as Android’s Always-on VPN, turn that off first, or choose unbraid instead. unbraid needs Android 13 or newer on a 64-bit ARM phone.

When the address ranges overlap

For a connection from an app that goes through unbraid, the destination address is checked in this order:

  1. The home WireGuard tunnel’s ranges.
  2. Tailscale addresses, 100.64.0.0/10, and any ranges under Home subnets through Tailscale, while Reach your tailnet is on.
  3. The local network, while Local network bypasses the VPN is on.
  4. Everything else follows a website rule if you set one, or the app’s route.

Apps set to Block have their own rules and reach none of these.

  • The config uses 100.64.0.0/10 addresses. Tailscale’s FAQ lists this as a conflict. In unbraid, a home tunnel whose AllowedIPs includes part of that range takes those addresses away from your tailnet. Narrow the range in the config, or renumber the WireGuard network.
  • Home and tailnet both offer the same subnet. If the home tunnel covers 192.168.1.0/24 and a subnet router advertises it too, the home tunnel carries it. Remove the home tunnel if you want Tailscale to do it.
  • The Wi-Fi you’re on uses your home range. A hotel network on 192.168.1.x and a home tunnel for 192.168.1.0/24 use the same addresses. The home tunnel wins, so the hotel’s printer or login page at such an address may not open. Renumbering your home network to a less common range avoids this.

One home server for the LAN and the internet

A full-tunnel config from your home router, imported as an exit, sends an app’s internet traffic out from home. It doesn’t give every app your home network. Only apps on that route use it, and while Local network bypasses the VPN is on, an address like 192.168.1.10 goes to the network the phone is on.

For both, make two peers on the server with different client keys: one config for the home tunnel and one for the exit. A WireGuard exit can’t reuse the home tunnel’s client key with the same server key and endpoint. unbraid blocks that route.

Test each connection

Use mobile data, or a Wi-Fi network away from home. On your home Wi-Fi, a device may answer without the tunnel. Connect first, and wait until the route’s card in Routes shows an address.

  1. Test WireGuard. For a home tunnel, open a device by its home address, such as http://192.168.1.10:8123. For an exit, open Cloudflare’s trace page in an app on that route. The value after ip= should match the public address on the route’s card. That address can differ from the Endpoint in your config. If the card couldn’t check the address, or a website rule covers cloudflare.com, the result tells you nothing.
  2. Test the tailnet. In the same app, open a service by its Tailscale address, such as http://100.x.y.z:port. Pick one that isn’t also inside the home tunnel’s ranges, and reload so you aren’t looking at a cached page.
  3. Turn Reach your tailnet off for a moment and reload both. The tailnet service should stop answering while WireGuard keeps working. Turn it back on and check that the service returns.

We checked these steps against the app’s code and haven’t run them on a phone for this guide. How to check your VPN is working covers DNS and IPv6.

Limits

  • Outbound only. The phone can open connections to your home and tailnet devices. unbraid refuses connections they open toward the phone.
  • IPv4. unbraid uses the IPv4 addresses and ranges of a config and blocks IPv6 for apps that go through it.
  • One Tailscale exit node at a time. All routes that use an exit node share the same one. A WireGuard exit and a Tailscale exit node can run side by side for different apps.
  • Direct apps. An app set to Direct and left outside unbraid uses your normal connection and reaches neither the home tunnel nor the tailnet. Direct apps that still pass through unbraid, for example while Android’s Block connections without VPN is on, can reach both.
  • No automatic server switching. If an imported WireGuard server stops answering, traffic on its route stops until it’s back.

Questions

Can I run Tailscale and WireGuard at the same time? On a computer the two can run together if their routes and firewall rules allow it, and some setups need extra configuration. On Android the two apps share one VPN slot per profile, so you need one of the setups above.

Can I import a WireGuard config into Tailscale? No. Tailscale manages its own keys and has no import for a .conf file. We found no export either.

Does my WireGuard traffic go through Tailscale? Not by default in unbraid. It connects to the WireGuard server directly, and tailnet addresses go through Tailscale. If you forward from a tailnet device into the tunnel, the phone reaches that device over Tailscale first.

Bring your own VPN

unbraid is a VPN client with no servers of its own. You sign in with an account you already have, or add your own server. It has built-in support for AirVPN, ExpressVPN, IVPN, Mullvad, NordVPN (affiliate link), Private Internet Access, Proton VPN (Free included), Surfshark (affiliate link) and Windscribe. For CyberGhost, you import config files from your account, with step-by-step help in the app.

We earn a commission if you subscribe through a link marked (affiliate link). It helps keep unbraid free. If you're about to subscribe to a VPN service, thank you for considering doing it through one of them.