Setting Up the App

An OpenVPN 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. What each setting did against a real server is in Test results.

Add a profile

Tap + on the home screen, tap Protocol and choose OpenVPN. Import the .ovpn file, 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., Import an OpenVPN profile. or This OpenVPN profile needs a username and password. 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 OpenVPN ticked
Choosing OpenVPN, on iPhone.
The same Protocol screen on Android
The same screen on Android.

The .ovpn profile

Tap Profile (.ovpn) and choose From Files or From URL. The app takes a profile with its certificates and keys inside it, as <ca>, <cert>, <key> and <tls-crypt> or <tls-auth> blocks; the server guide makes such a file. It refuses a file that does not look like a profile, and one whose certificate was damaged on the way, which happens when a profile is copied through a chat app: import the original file, or use From URL. The row then says Imported.

The profile holds the phone's private key. On Android the app keeps it in its encrypted store.

Profile editor on iPhone with an imported profile: Profile (.ovpn) Imported, Server, Port 1194 and Enable stunnel off
A profile with a certificate login, on iPhone.
The same profile on Android
The same on Android.

Server

FieldWhat to enter
ServerFilled from the profile's first remote line when you import it. Change it to connect to another name or address; then the app uses it instead of the profile's remote lines. Left as it came, a profile with several remote lines keeps them: when the first does not answer, the app tries the next.
PortFilled from the same line. Changed, it replaces the profile's port. Empty means 1194.
Enable stunnel (TLS)Off by default. On: OpenVPN runs over TCP inside a TLS connection to the server's stunnel listener (stunnel on port 443); a UDP profile goes over TCP too.
stunnel HostOptional; empty means Server.
stunnel PortOptional; empty means 443.
stunnel SNIOptional; the name the app sends in the TLS handshake and checks the certificate against. Empty means stunnel Host. A server name in SNI that differs from the host lets the connection look like one to that name, as long as the certificate is valid for it.
CA CertificateSystem Trust by default: the certificate must come from a public certificate authority, such as Let's Encrypt. Tap it to import the PEM of your own CA instead; the app then accepts only certificates that CA signed.
Profile editor on iPhone with Enable stunnel on and the stunnel Host, Port, SNI and CA Certificate rows
A profile with stunnel on, on iPhone.
The same profile on Android
The same on Android.

Authentication

A profile with an auth-user-pass line asks for a Username and Password; the section appears only then. A profile with only a certificate needs neither. A password may hold any character, spaces and letters of any script included.

Profile editor on iPhone with a profile that asks for a username and password
A profile with a password login, on iPhone.
The same profile on Android
The same on Android.

Options

Options section on iPhone: Auto Reconnect, Retry Times, Switch to Wi-Fi When Available, On Sleep, Log Level and TLS Fragmentation
The options of a profile with stunnel on, on iPhone.
The same options on Android
The same on Android.
OptionWhat it does
Auto Reconnect, Retry TimesAuto Reconnect (on by default): when the connection breaks, the server restarts the session, or the server has not answered for 60 seconds (the server's keepalive), the app connects again, and keeps trying while the server is away. Retry Times limits the attempts in a row; empty means no limit. Before the first connection, the app tries each remote line of the profile once, and Retry Times repeats that. Without Auto Reconnect, a VPN that was up ends with the reason, for example The server restarted the session (auto reconnect is off). A refused login, a server certificate the profile's CA did not sign, and a server that halts the session are never retried. A phone certificate the server refuses looks like a server that does not answer (the server says nothing), so Retry Times counts those attempts too.
Switch to Wi-Fi When AvailableOn by default: when Wi-Fi appears while the VPN is up, the app moves the connection to it.
On SleepStay (default) keeps the connection 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, port and transport the app connects to, the settings the server pushed, the session, and why a connection ended. Expert and Debug add OpenVPN's own lines and its events. No level writes the password or 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 OpenVPN: closing with reason: names the reason.
TLS FragmentationOnly with stunnel on. It splits the first TLS messages of the stunnel connection into small TCP segments, which some networks cannot read as a TLS handshake. Off (default) sends them whole. Auto sends 43 bytes, then pieces of 256 bytes (128 on mobile data). Manual takes First Chunk and Following Chunks in bytes, 32 and 256 when empty. The pieces end with the handshake.

An OpenVPN profile has no proxy setting: the app always connects to the server, or to its stunnel listener, directly.

Connect and check

Home screen on iPhone with three example OpenVPN profiles, each showing its server and port
OpenVPN 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 accepted the phone and sent its settings. The row of the profile then shows the time of one request through the tunnel. If it fails, the app shows Connection Failed with a reason; Troubleshooting explains each one.