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.
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.
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.
- Import Config (.conf) opens the phone's files. The app takes a file in awg-quick format, with an
[Interface]and a[Peer]section, as the server guide makes it, with every setting of the awg tools from AmneziaWG 1.0 to 3.1; it refuses a file without the two sections: The file does not look like a WireGuard config (no [Interface]/[Peer] sections). The row then says Imported, and Server and Port fill themselves in from the file'sEndpointline. A WireGuard profile does not take a file with AmneziaWG settings: This file has AmneziaWG settings (S1 and others). Choose AmneziaWG VPN as the protocol to use it. - Manual Configuration takes the same values one by one, in four groups:
- This device: Private Key (type it, or tap Gen for a new one), Public Key worked out from it (tap it to copy it, and add it to the server as a peer), Address inside the tunnel and DNS.
- Server (peer): Server Public Key, Preshared Key (optional, but it must match the server's for this phone), AllowedIPs (empty means 0.0.0.0/0) and Keepalive in seconds (empty means none). The endpoint is the profile's Server and Port.
- AmneziaWG: same as the server: S1 to S4, H1 to H4 (a number or a range such as 1100000000-1199999999), Header Protection Key and Random Trailers. These must be the server's values. Leave them all empty for a server without obfuscation.
- AmneziaWG: this device only: Jc, Jmin, Jmax, I1 to I5, Content Padding, the timings Rekey After Time, Rekey Timeout, Reject After Time, Keepalive Timeout and Max Handshake Attempts, and Disable Cookies. Each number may be a range (4-6), from which a value is picked each time; empty means the engine's default, shown as the field's hint.
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.
Server and Port
| Field | What to enter |
|---|---|
| Server | The server's name or address. An import fills it from the file's Endpoint; changed, it replaces it. |
| Port | The 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
| Option | What it does |
|---|---|
| Auto Reconnect, Retry Times | The 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 Sleep | Stay (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 Level | How 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
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.