Setup OpenVPN Connect Client in iPhone iOS

This guide walks you through connecting your iPhone or iPad to an OpenVPN server running on a MikroTik Cloud Hosted Router or your physical MikroTik device. If you haven't set up your server yet, start with our OpenVPN server setup guide first.

Important: The date and time on both your router and your iPhone must fall within the validity period of the installed certificates. Enable NTP synchronisation on both the server and the client to avoid certificate verification failures.

Unlike Windows or macOS, iOS cannot load certificates from separate files — all certificates and keys must be embedded directly inside the .ovpn configuration file. This guide covers only the embedded method.

1
Download OpenVPN Connect for iOS devices

The only OpenVPN client available for iOS is the official OpenVPN Connect app, published by OpenVPN Technologies. Download it for free from the App Store:

OpenVPN Connect — App Store

OpenVPN Connect app listing on the Apple App Store by OpenVPN Technologies, showing the app icon, Open button, 5-star rating and Utilities category

Install the app and then come back here to continue — you'll need it open once your configuration file is ready.

2
Create a PPP user account on your CHR

Before you can connect, you need a VPN user account on the server. Log in to your MikroTik CHR via WinBox or Webfig, go to PPP > Secrets, and click + NEW. Set a username and a strong password and make sure the profile is set to default-encryption.

Creating a new PPP Secret in RouterOS — PPP > Secrets > New dialog with username BGOCloud-OVPN, password field and default-encryption profile selected

RouterOS CLIppp secret add name=iOSUser password=StrongPassword profile=default-encryption comment="iOS client"

Keep this username and password handy — you'll enter them in the OpenVPN Connect app when importing the profile.

3
Export the certificates from your CHR

You'll need the following certificate files from your CHR to build the configuration:

  • The CA certificate (.crt)
  • The client certificate (.crt)
  • The client certificate private key (.key)

In WinBox, go to System > Certificates. Right-click each certificate and choose Export. Give them clear names. When exporting the client certificate, always set a passphrase — you'll enter it in the OpenVPN Connect app as the Private Key Password.

Right-clicking the LMTCA certificate in MikroTik WinBox and selecting Export from the context menu

RouterOS CLIcertificate export-certificate LMTCA export-passphrase=""
certificate export-certificate CLIENT1 export-passphrase=12345678

The exported files appear in Files on the CHR. Select them all and drag-and-drop them to a folder on your computer, or right-click and choose Download.

MikroTik WinBox Files window showing exported certificate files — CA cert, server cert and client cert listed and ready to download

4
Create the .ovpn configuration file

There are two ways to get your .ovpn config: let RouterOS generate it for you (easiest, requires v7.9+), or build it manually from a template. Either way, all certificates and keys must be embedded directly in the file — iOS does not support loading them from separate files.

4a. Auto-export from RouterOS (v7.9+) — easiest method

Since RouterOS v7.9, you can generate a complete .ovpn config directly from the CHR. It picks the best encryption settings automatically and embeds all the necessary certificates — ideal for iOS.

In WinBox, go to PPP > OVPN Servers and open any server(RouterOS 7.17+) or PPP > Interface > OVPN Server (older versions) and click Export .ovpn. Fill in your CHR's public IP address, then select the CA certificate, the client certificate, and its key.

RouterOS OVPN Server settings showing the Export .ovpn button and the Export .ovpn dialog with server public address, CA certificate LMTCA.crt, client certificate CLIENT1.crt and client key CLIENT1.key fields

The generated .ovpn file will appear in Files on the CHR. Right-click it and choose Download to save it to your computer.

MikroTik WinBox Files window showing the exported .ovpn config file with the right-click Download option highlighted

The RouterOS-generated config doesn't enable full tunnel routing or credential cache clearing by default. Open the file in any text editor and add these two lines just before the embedded certificate block:

.ovpn file — add before the <ca> block...
reneg-sec 3600
remote-cert-tls server
auth-nocache
redirect-gateway def1
<ca>
-----BEGIN CERTIFICATE-----
...

4b. Build the config from scratch

If you're on RouterOS older than v7.9, or want full control over the config, create a new file with a .ovpn extension and open it in a text editor. Paste the template below, adjusting the IP address, port, cipher, and auth to match your server's settings. Then paste the full contents of each certificate and key file into the matching section — all certs must be embedded, not referenced by filename.

Example .ovpn configuration fileclient
dev tun
proto tcp-client
remote IP_ADDRESS_OF_YOUR_CHR
port 1194
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
<ca>
PASTE CONTENTS OF THE CA (LMTCA) CERTIFICATE HERE
</ca>
<cert>
PASTE CONTENTS OF THE CLIENT CERTIFICATE HERE
</cert>
<key>
PASTE CONTENTS OF THE ENCRYPTED PRIVATE KEY HERE
</key>
verb 4
mute 10
cipher AES-256-CBC
data-ciphers AES-256-CBC
auth SHA1
auth-user-pass
auth-nocache
redirect-gateway def1

4c. Pre-saving VPN credentials in the config (optional, but insecure — not recommended for shared devices)

The safest approach is to enter your VPN username and password in the OpenVPN Connect app when prompted. However, if you need to pre-embed them in the config, add an <auth-user-pass> block with the username and password on separate lines:

Embedded credentials in .ovpn file...
cipher AES-256-CBC
data-ciphers AES-256-CBC
auth SHA1
<auth-user-pass>
Username
Password
</auth-user-pass>
auth-nocache
redirect-gateway def1
...
5
Import the config and connect on your iPhone
Note: If you update the configuration or replace certificates, you must delete the existing profile in OpenVPN Connect and re-import it. The app does not detect changes automatically.

First, get the .ovpn file onto your iPhone. You have a few options:

  • WinBox for iOS: Open the WinBox app, navigate to Files, tap on the .ovpn file, tap the (three-dot) menu in the top-right corner, then tap Download.
  • From your computer: Send the file to yourself via AirDrop, email, or save it to iCloud Drive / Files.

MikroTik WinBox for iOS showing the IOS OVPN.ovpn file detail screen with the three-dot menu highlighted and a Select action sheet offering Download and Copy options

Once the file is on your device, locate it in the Files app (or in your Downloads), tap on it to open the share sheet, then tap the OpenVPN icon to hand it off to OpenVPN Connect.

iOS share sheet showing the iOS OVPN OpenVPN Profile file with the OpenVPN app icon highlighted in the share row alongside AirDrop, Messages and Mail

OpenVPN Connect will open and show the imported profile on its Get connected screen. Tap ADD to confirm the import.

OpenVPN Connect iOS Get connected screen showing 1 new OpenVPN profile available for import with the profile name yourmchr.ip [IOS OVPN] and the ADD button highlighted

You'll land on the Imported Profile screen. Give the profile a name you'll recognise, enter your VPN username, and tick Save password and Save Private Key Password if you don't want to be prompted every time you connect. Enter the VPN password from Step 2 and the Private Key Password (the export passphrase you set in Step 3), then tap CONNECT.

OpenVPN Connect iOS Imported Profile screen with Profile Name BGOCloud VPN, Server Hostname yourmchr.ip, Username field, Save password and Save Private Key Password checkboxes both ticked with passwords filled in, and the CONNECT button

iOS may ask for a permission to add a VPN configuration to your device. Tap Allow — this is a standard system prompt and is required for any VPN app on iOS.

iOS system dialog — OpenVPN Would Like to Add VPN Configurations — with the Allow button highlighted

That's it. OpenVPN Connect will show CONNECTED with live traffic stats once the tunnel is up.

OpenVPN Connect iOS Profiles screen showing CONNECTED status with the BGOCloud VPN profile toggle turned on and live connection stats showing bytes in and bytes out

The next time you want to connect, simply open OpenVPN Connect and tap the toggle next to your profile — no need to re-import anything.

OpenVPN Connect iOS Profiles screen showing the BGOCloud VPN profile in DISCONNECTED state with the toggle switch highlighted for quick reconnection


Your iPhone is now connected to your MikroTik CHR OpenVPN network. If you run into problems, check our OpenVPN troubleshooting guide for common issues and fixes.

Need a MikroTik CHR to host your VPN on? BGOCloud's MikroTik VPS plans give you full RouterOS access, SSD performance, and unlimited traffic options — ready in under a minute. The perfect foundation for running a private OpenVPN server.

Get Powerful MikroTik CHR VPS with unlimited traffic.

Get Started!
icon knowledge

Related Articles

MikroTik CHR: Setup Secure VPN access between client and server using OpenVPN

In this article, we will show you how to set up secure VPN access to your server using OpenVPN....

How To: Connecting Linux devices to OpenVPN Access Server via CLI and APT in Ubuntu / Debian

How To: Connecting Linux devices to OpenVPN Access Server via CLI and APT in Ubuntu / Debian We...

How to: Connecting Windows Device to OpenVPN Access Server

In this guide we will show you all the steps for connecting your Windows device to your new...

Troubleshooting OpenVPN Server issues on a MikroTik CHR

In this article you can find how to resolve any issues that might occur while setting up your...