To use WireGuard on an iPhone, install the official WireGuard app from the App Store, add a tunnel from a configuration file or a QR code, and switch the tunnel on. You need a server to connect to, because WireGuard is software and comes with no servers.
The details below come from the WireGuard project's own site, the iOS app's published source code, Apple's listing data and support pages, and the setup guides of two VPN providers, all read 26 November 2026. We did not go through these steps on an iPhone ourselves, so nothing below is a test result.
What you need to run WireGuard on an iPhone
There are two parts, and the project supplies only the first:
- A client. On an iPhone or iPad this is the WireGuard app.
- A configuration for a server. A WireGuard tunnel is set up with your private key and the other side's public key (WireGuard's overview). Whoever runs the server gives you these details together with the server's address. On a phone they arrive as a small text file ending in
.conf, as a zip archive of such files, or as a QR code. The server can be your own, your employer's, or a VPN provider's that offers WireGuard files.
If you have no server and don't want to run one, skip to the section on a VPN app with WireGuard built in. For the protocol itself, see our guide to what WireGuard is.
The official WireGuard app for iPhone and iPad
The project's installation page has one entry for iOS, and it links to the App Store. Apple's listing data gives the app's name as WireGuard and its seller as WireGuard LLC. The current version is 1.0.16, last updated on February 16, 2023. It needs iOS 15.0 or later, and iPhone and iPad models are among the devices it lists (Apple's listing data for the US storefront, checked 26 November 2026).
The listing says the app "can import new tunnels from archives and files, from QR codes, or you can create one from scratch", and it sends readers to wireguard.com for "how to set up your own WireGuard server for use with this app". The app is a client and comes with no server of its own.
iOS supports some VPN protocols by itself, and WireGuard is not one of them. Apple's deployment guide names IKEv2, L2TP over IPsec and Cisco IPsec as the protocols that need no third-party app (VPN overview for Apple device deployment).
How to set up WireGuard on an iPhone
These steps use the WireGuard app. The button names are the ones in its source code, and the order follows the guides that Proton VPN and Mullvad publish for their own customers (Proton VPN support and Mullvad's guide, read 26 November 2026).
- Install WireGuard. Open WireGuard on the App Store and install it.
- Get your configuration. Save the
.conffile from whoever runs your server to the iPhone, or have its QR code ready on another screen. Either one holds your private key, so keep it as you would a password. - Add the tunnel. Open WireGuard and tap Add a tunnel. If the app already holds a tunnel, use the add button in the top bar. Choose Create from file or archive and select the file, or choose Create from QR code and point the camera at the code.
- Allow the VPN configuration. Mullvad's guide says to tap Allow when WireGuard asks to add VPN configurations, and that you may need to enter the device's passcode to confirm.
- Switch the tunnel on. Tap the switch next to the tunnel's name. The same switch turns it off.
- Check that traffic flows. Tap the tunnel's name to open its details. Once the tunnel has exchanged data, the Peer section shows Latest handshake, Data received and Data sent. A handshake is an exchange of two messages, one in each direction, so a handshake time there shows that the server has answered (WireGuard's protocol page). Then confirm that your public IP address has changed. Our guide to checking whether a VPN is active shows how.
The app's Settings screen has Export zip archive, which exports your tunnels as a zip file, and View log (the app's settings code and interface text on GitHub).
Adding a tunnel from a QR code
A WireGuard QR code is the configuration file in another form. The app hands the scanned text to the same code that reads a .conf file, and the scanner screen carries a tip for making one: "Generate with qrencode -t ansiutf8 < tunnel.conf". Whoever holds the file can run that command. Because the code holds your private key, a photo or screenshot of it is as sensitive as the file.
A tunnel added from a file takes the file's name. After a scan the app asks you to "name the scanned tunnel". The scanner works from the camera, and its code has no way to pick a picture from your photo library, so the code has to be on another screen or on paper. If the configuration is on the iPhone itself, use the file route.
What a WireGuard configuration file looks like
A client file that sends all traffic through a VPN server has two sections. This one follows the example in the wg-quick manual page, with the keys left out:
[Interface]
PrivateKey = (your private key)
Address = 10.200.100.8/24
DNS = 10.200.100.1
[Peer]
PublicKey = (the server's public key)
AllowedIPs = 0.0.0.0/0
Endpoint = demo.wireguard.com:51820
PrivateKeyis your own secret key, andPublicKeyis the server's public key.Addressis the address your iPhone takes inside the tunnel.DNSis the DNS server to use while the tunnel is up.AllowedIPslists the destinations that go through the tunnel. The manual page says an entry of0.0.0.0/0makes the tunnel the default gateway, which means all IPv4 traffic.Endpointis the server's address and port.
The format is described in the wg-quick manual page.
The iPhone app reads this format, but it does not take every key that wg-quick does. Its source code accepts PrivateKey, ListenPort, Address, DNS and MTU under [Interface], and PublicKey, PresharedKey, AllowedIPs, Endpoint and PersistentKeepalive under [Peer]. The script keys in the manual page, such as PostUp and PreDown, are not on that list, and a file that holds any other key is refused.
To change a tunnel on the phone, open its details and tap Edit. The same values appear there as fields, among them Addresses, DNS servers, Endpoint and Allowed IPs.
On-Demand Activation on cellular and Wi-Fi
The edit screen ends with a section called On-Demand Activation. It has two switches, Cellular and Wi-Fi. With Wi-Fi on, a row named SSIDs lets you choose Any SSID, Only these SSIDs or Except these SSIDs; an SSID is the name of a Wi-Fi network. Mullvad's guide suggests the option "if you are experiencing frequent disconnections or if you want to ensure that the VPN service is always active". Apple describes VPN On Demand as letting a device "automatically establish a connection on an as-needed basis".
For a tunnel with On-Demand rules, the switch in the app turns On-Demand on and off, and switching it off also stops the tunnel. If you switch the VPN off in the iPhone's own settings and leave On-Demand on, iOS can reconnect it. Our guide to an iPhone VPN that keeps turning on explains that behavior.
WireGuard's overview says both ends "send encrypted data to the most recent IP endpoint for which they authentically decrypted data", which it calls "full IP roaming on both ends". When your phone moves from Wi-Fi to cellular and its address changes, the server learns the new address from the next authenticated packet it receives.
If you don't run a server: a VPN app with WireGuard built in
The WireGuard app needs a configuration, and a configuration needs a server. If you don't have one, the alternative is a VPN app whose maker runs the servers and builds the protocol in. Tegant VPN is our own app, and it works this way.
Tegant for iPhone and iPad is on the App Store. On the main screen you choose WireGuard or XRay, pick a server and connect. Tegant has servers in 18 countries, and WireGuard is available in all of them except Hong Kong, which is XRay only. WireGuard runs in the Linux kernel on our servers. The free tier, where it is available, is ad-supported and WireGuard only.
Tegant doesn't provide configuration files, so you use its servers through the app and can't load them into the WireGuard app. It has no kill switch and no auto-connect, so check that Tegant shows it is connected before you do anything sensitive.
WireGuard's own list of known limitations says it "does not focus on obfuscation" and does not support tunneling over TCP. On a network that blocks it, a different kind of protocol is the next thing to try. XRay is part of Tegant Premium on iPhone, iPad, Mac and Android, and it is available in 15 of Tegant's 18 server countries; France, Italy and Spain are WireGuard only. Our guide to V2Ray on an iPhone covers that route. No VPN can guarantee access on every network, and that includes ours.
Rules on VPNs differ from country to country and change often, so check the current law where you are. Our guide to how VPN rules differ by country has more.
Common problems
- The file won't import. When you import a single file and it can't be read as a configuration, the iPhone app's alert is titled "Unable to import tunnel" and says the file "does not contain a valid WireGuard configuration". It doesn't say which line is at fault. Check that the file has one
[Interface]section, and remove keys that are not on the list above. - The QR code won't scan. "Invalid QR Code" means the app read the code but the text in it is not a valid WireGuard configuration. "Invalid Code" means the code could not be read at all.
- The tunnel is on but nothing loads. Look at Latest handshake. If no time appears, the server has not answered: check the
Endpointaddress and port, and check with whoever runs the server that your public key is registered there. - The same configuration is on two devices. Mullvad's guide says to generate a separate key pair for each device, because you "will otherwise likely run into connectivity issues". Don't copy your Mac's file to your phone; ask for a second one.
- "DNS resolution failure". The app shows this when "one or more endpoint domains could not be resolved". The
Endpointline holds a host name that your iPhone can't look up, so check the spelling and your internet connection. - The handshake field says the system clock was wound backwards. WireGuard relies on the system time, and its list of limitations says handshakes become impossible if the clock jumps backwards. Check the date and time under Settings, General, Date & Time (Apple's guide).
- You can't reach devices on your own network. Mullvad's guide says to open the tunnel, tap Edit and turn on Exclude private IPs. In the app's code that switch is offered when the tunnel has a single peer and sends all IPv4 traffic through it.
- The network blocks it. WireGuard runs over UDP and has no TCP mode, so a network that blocks its packets stops the tunnel. See the section above on a different kind of protocol.
If the trouble is with a VPN app and not the WireGuard app, see our guide to an iPhone VPN that is not working.
WireGuard on iPhone questions
Is there an official WireGuard app for iPhone?
Yes. The WireGuard project's installation page links to it on the App Store, and Apple's listing data names WireGuard LLC as the seller (checked 26 November 2026).
Does WireGuard work on an iPad?
Apple's listing data for the WireGuard app lists iPad models among the devices it supports, next to iPhone models (US storefront, checked 26 November 2026). It is one listing for both.
Can I set up WireGuard on an iPhone with a QR code?
Yes. Tap Add a tunnel, choose Create from QR code and point the camera at the code. The code holds the same text as a configuration file, including your private key.
Does WireGuard for iPhone come with a VPN server?
No. It is a client. Its listing sends readers to wireguard.com to learn how to set up their own server, so the configuration has to come from a server you run or from a provider.
Is WireGuard built into iOS?
No. Apple's deployment guide names IKEv2, L2TP over IPsec and Cisco IPsec as the protocols iOS supports without a third-party app. WireGuard needs the app.
Tegant VPN supports WireGuard and, with Premium, XRay, so you can switch protocols depending on your network. Learn more about Tegant VPN.