NebulaVPN · Guides

How to install and connect AmneziaWG on iPhone, Android and Windows

Updated: 6 min read

If you live outside Iran and need an Iranian IP for your bank's app, the Sana judiciary portal or Sejam, you have probably come across AmneziaWG. It is a modified version of WireGuard built to get past network filtering. This step-by-step guide shows you how to install the AmneziaWG app on iPhone, Android and Windows, import your configuration file, and track down the problem if it won't connect.

What is AmneziaWG, and how is it different from WireGuard?

WireGuard is a fast, simple VPN protocol, but its packets follow a fixed, recognisable pattern. Iran's filtering systems know that pattern and frequently cut ordinary WireGuard connections to servers inside the country.

AmneziaWG keeps WireGuard's core but changes how the packets look: it sends meaningless "junk" packets before the handshake and alters the packet headers. That is why an AmneziaWG config file has a few extra lines, such as Jc, Jmin, Jmax, S1, S2 and H1 to H4.

One important detail: the official WireGuard app does not understand these lines. You cannot import an AmneziaWG config into the WireGuard app; you need the AmneziaWG app. The reverse does work: the AmneziaWG app happily accepts a plain WireGuard config, so if you use both an Iranian server and a foreign one, one app covers both.

Before you start: get your config ready

Every AmneziaWG provider gives you either a file ending in .conf or a QR code. That file contains your private key, so don't send it to anyone or post it in groups and channels. On a phone, scanning the QR code is the easiest route. On Windows, download the .conf file and save it somewhere you can find it.

Download the AmneziaWG app

Get the official AmneziaWG app for your device. Every link goes to the app stores or Amnezia's official GitHub page, not our servers.

Android

Google Play or APK file
Other versions:APK file (17 MB)
Get it on Google Play

iPhone & iPad

App StoreGet it on the App Store

Windows

msi installer · 3 MB
Other versions:ARM6432-bit
Download for Windows

Mac

Apple silicon Macs, App StoreGet it on the App Store

Linux

With the AmneziaVPN appLinux download
Amnezia
Prefer AmneziaVPN?Downloads for every device and a video walkthrough
Video guide

Installing AmneziaWG on iPhone (iOS)

  1. Search the App Store for AmneziaWG and install it. Fake apps with similar names exist, so check the name and description carefully.
  2. Open the app and tap the + button.
  3. Choose to create a tunnel from a QR code and scan it. If you have a file instead, choose to create from file and pick the .conf file in Files.
  4. Give the connection a name, for example "Tehran server".
  5. iOS asks for permission to add VPN configurations. Tap "Allow" and confirm with Face ID or your passcode.
  6. Turn on the switch next to the connection. A VPN icon appears at the top of the screen.

If you only want the VPN on when you need it, switch it off after your banking is done so your normal browsing doesn't slow down.

Installing AmneziaWG on Android

  1. Install AmneziaWG from Google Play.
  2. Tap + and choose "Scan from QR code" or "Import from file".
  3. Enter a name for the connection and save it.
  4. Turn the connection on and accept Android's request to set up a VPN connection.

If your phone has "Always-on VPN" or "Block connections without VPN" enabled for another VPN app, turn that off first; Android runs only one VPN at a time.

Installing AmneziaWG on Windows

  1. Download the Windows version only from the project's official GitHub page (the amnezia-vpn/amneziawg-windows-client repository, under Releases). Don't download it from unknown download sites.
  2. Run the installer (.msi) and follow the steps.
  3. In the app, click "Import tunnel(s) from file" and select your .conf file.
  4. The tunnel appears in the list on the left. Select it and click "Activate".
  5. When the status says "Active" and "Latest handshake" keeps updating, you are connected.

How to check that you have an Iranian IP

With the VPN on, open any "what is my IP" website in your browser. The country should read "Iran". If it still shows the country you live in, your traffic isn't going through the tunnel; see the troubleshooting section below.

Fixing the most common problems

The connection is on, but no website loads

On Windows, look at "Latest handshake". If it is empty, your packets aren't reaching the server. Switch networks (for example from Wi-Fi to mobile data) and try again; some university, hotel and office networks block UDP traffic.

"Invalid key" or "Unrecognized key" when importing the file

Either you imported an AmneziaWG config into the WireGuard app, or the file got damaged when it was copied. Install the AmneziaWG app and import the file directly rather than pasting its text through a messenger.

The banking app still shows an access error

Close the banking app completely and reopen it after the VPN is on. If another VPN is installed on the phone, such as a work VPN, switch it off. Also make sure you are connected to the Iranian server, not a foreign one.

The connection drops every few minutes

In your phone's battery settings, remove battery restrictions for the AmneziaWG app. Operating systems sometimes kill apps that run in the background.

Why a static IP is better for banking

Banks treat a constantly changing IP as suspicious behaviour and may block the login or ask for extra verification. If you always connect from the same static Iranian IP, the bank sees someone who always signs in from the same place. NebulaVPN runs a server in Tehran with AmneziaWG and a static IP for exactly this reason, and delivers your config and QR code through the user dashboard or the Telegram bot, so this guide applies to it as written.

Frequently asked questions

Is AmneziaWG free?

The AmneziaWG app is free and open source. To connect to a server, though, you need a config from a provider or from your own server.

Can I use an AmneziaWG config in the WireGuard app?

No. The WireGuard app doesn't recognise AmneziaWG's extra parameters. The other way round works: a WireGuard config runs fine in the AmneziaWG app.

Can I use one config on several devices?

Better not. If the same config is active on two devices at once, the connections fight each other and keep dropping. Get a separate config for each device.

Does it work on a Mac?

Yes. The Amnezia app is available for macOS and imports configs the same way. Install it only from the App Store or the project's official website and GitHub.

Should I keep the VPN on all the time?

There's no need. Turn it on for banking and government portals, then turn it off. If your plan has a data limit, this also saves data. You can compare plans and their limits on the pricing page.

More guides