Setup WireGuard client on iPhone

Reading Time: 3 minutes

In my blog post here I showed you how to setup and configure WireGuard VPN Server side. I that blog post I also tell you what WireGuard is and what the benefits are. Everything in this blog post continues based on the configuration in my previous blog and in this blog post I will show you how to setup WireGuard client on iPhone.

Requirement for this blog: Setup WireGuard VPN server by me.

First we need to download WireGuard for iOS from the Apple App Store. You can do that on your iPhone or click on the link here which will take you directly to the WireGuard app in the App Store.

For your iPhone visit the App Store and search and download WireGuard:

Setup WireGuard client on iPhone - vikash.nl

Adding the configuration to the iPhone app is a lot less steps compared to the Windows client. We will generate a QR code on the WireGuard server (the DietPi) and simply scan that QR code on the iPhone WireGuard app.

To do that connect to your DietPi server using SSH and go to the /etc/wireguard directory. There you should have the configuration files for you server and your clients if you followed my blog post about setting up your own WireGuard VPN Server. Let check if everything is there with the ls -l command:

Setup WireGuard client on iPhone - vikash.nl

As you can see there I named my client configuration file iphone.conf. To generate the QR code typ the following command:

grep -v '^#' /etc/wireguard/iphone.conf | qrencode -t ansiutf8

A QR code will be generated in the terminal:

Before you do this you have to make sure that your iPhone is connected to the same network as the WireGuard VPN Server. Open the WireGuard app on your iPhone and tap Add a Tunnel and then select the Create from QR Code option:

wireguard_ios_vikash.nl_03

Scan the QR code with the camera and give the tunnel a name:

Setup WireGuard client on iPhone - vikash.nl

Enter your iPhone pincode to add the tunnel:

The iPhone will now automatically add the VPN tunnel in the settings app and then switch to the WireGuard VPN app. There you will see the VPN tunnel:

That’s all for adding a WireGuard tunnel to your iPhone.

(Visited 5,048 times, 1 visits today)

About Vikash Jhagroe

Equipped with more than 15 years of experience working on applications and systems, Vikash is a master at connecting businesses with the tech that is right for them. He is passionate about computers and computer systems, and he is committed to serving his clients well. He is a tech-wizard.

View all posts by Vikash Jhagroe

3 Comments on “Setup WireGuard client on iPhone”

  1. Hallo Vikash, dank je wel voor je visie over Wireguard. Ik heb Wireguard geïnstalleerd op een Raspberry Pi 4, die dient als server. ik heb een connectie kunnen leggen vanaf de iMac maar vanaf mijn iPhone lukt het niet! De iPhone verbindt wel (denk ik) maar de verbinding valt onmiddellijk weg. (alleszins de aanduiding VPN rechts boven op het scherm). Kan je me eventueel helpen of tips geven?

    1. Hi Jef,

      De wireguard client (ook in iPhone) zou je meer info kunnen geven waarom de verbinding verbreekt. Check daar in de log. Je zou als test ook de wireguard client config die je op de iMac gebruikt op je iPhone kunnen zetten en omgekeerd van de iPhone op je iMac. De client houdt connection logging bij. Succes!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.