Setting Up the App

An AmneziaWG profile has the same fields on iPhone and Android. This page goes through them in the order the profile editor shows them.

Where this page comes from

The fields, defaults, footers and messages were read from the source code of both apps, and the screenshots were taken from them with example profiles, example keys and example obfuscation values. What each setting did against a real server is in Test results.

Add a profile

Tap + on the home screen, tap Protocol and choose AmneziaWG VPN; Port becomes 51820. Import the phone's .conf file or enter its keys and the server's obfuscation values, check the fields below and tap Save. Save names the first thing that is still missing instead of saving an incomplete profile: Enter the server address. or Import or enter an AmneziaWG configuration. Description, under Protocol, is optional: the profile's name on the home screen, which otherwise shows the server's name or address.

Protocol screen on iPhone with AmneziaWG VPN ticked
Choosing AmneziaWG, on iPhone.
The same Protocol screen on Android
The same screen on Android.

The configuration

There are two ways to give the app the phone's keys and the server's obfuscation values; an imported file wins over values entered by hand.

The file, the keys and the header protection key are this phone's secrets: on iPhone the app keeps them in the Keychain, on Android in its encrypted store. Configuration Reference explains every setting.

Profile editor on iPhone with an imported configuration: Import Config Imported, Server and Port 51820
A profile with an imported file, on iPhone.
The same profile on Android
The same on Android.
Manual Configuration on iPhone: Private Key with Gen, Public Key, Address, DNS, Server Public Key, Preshared Key, AllowedIPs and Keepalive
Keys entered by hand, on iPhone.
The same screen on Android
The same on Android.
The group AmneziaWG: Same as the Server on iPhone: S1 to S4, H1 to H4 with ranges, Header Protection Key and Random Trailers
The values that must match the server, on iPhone.
The same group on Android
The same on Android.
The group AmneziaWG: This Device Only on iPhone: Jc, Jmin, Jmax, I1 to I5, Content Padding, the timings and Disable Cookies
The phone's own values, on iPhone.
The same group on Android
The same on Android.

Server and Port

FieldWhat to enter
ServerThe server's name or address. An import fills it from the file's Endpoint; changed, it replaces it.
PortThe server's UDP port. An import fills it from the same line; changed, it replaces the file's port. Empty means the file's port, or 51820 for values entered by hand.

An AmneziaWG profile has no proxy setting: AmneziaWG runs over UDP, straight to the server.

Options

Options section on iPhone: Auto Reconnect, Retry Times, On Sleep and Log Level
The options, on iPhone.
The same options on Android
The same on Android.
OptionWhat it does
Auto Reconnect, Retry TimesThe server answers nothing to a phone it does not take, so the app counts as connected only once the server answered its handshake: it waits 10 seconds for that, and Retry Times adds more attempts of 10 seconds before it gives up. While the VPN is up, nothing coming back for 30 seconds while the phone sends means the server stopped answering. Auto Reconnect (on by default) then starts new handshakes, 10 seconds each, until the server answers again; Retry Times limits them (empty means no limit). Without Auto Reconnect, the VPN ends with the reason: The server stopped answering: nothing came back for 30 seconds (auto reconnect is off). A server that restarts or is away for a few seconds is answered by AmneziaWG itself, without an attempt. A server that answers its handshakes but none of the traffic ends the VPN at once, with or without Auto Reconnect: a new handshake would be answered the same way.
On SleepStay (default) keeps AmneziaWG running while the device sleeps. Pause closes it and connects again on wake. Off closes it; on wake it connects again only with Auto Reconnect, otherwise the VPN ends with The connection was closed while the device slept.
Log LevelHow much the connection log shows. Normal: the milestones: the server, its address and port, whether the profile has a keepalive and a preshared key, which obfuscation settings the profile has (their names, not their values) and the tunnel's MTU, the handshake, network changes, and why a connection ended. Expert adds a line every 30 seconds with the time since the last handshake and the bytes received and sent. Debug adds AmneziaWG's own lines. No level writes a key. Tap the status under the power button to open the log. When the app gives up on a connection, a line starting with AmneziaWG: closing with reason: names the reason.

There is no Switch to Wi-Fi When Available: AmneziaWG always uses the network the phone uses, and its packets go over Wi-Fi by themselves when it appears. On every change of network the app moves AmneziaWG's sockets to the new one.

Connect and check

Home screen on iPhone with three example AmneziaWG profiles, each showing its server and port
AmneziaWG profiles on the home screen, on iPhone.
The same home screen on Android
The same on Android.

Select the profile on the home screen and tap the power button. The status changes to Connected once the server has answered the handshake. The row of the profile then shows the time of one request through the tunnel. If the server does not answer, the app shows Connection Failed with the reason; Troubleshooting explains each message.