Skip to content

Sign In

Sign in to manage your subscription

BessyConnect
Author: Pavel Onuchin, VPN and network security specialist

12 min read

VPN file: what it is and how to open .ovpn, .conf and JSON on any device

A VPN file is a configuration file: text with the server address, keys and encryption parameters. It doesn't launch anything by itself; you need to import it into the app for its protocol. A .ovpn file is opened by OpenVPN Connect, .conf by WireGuard or AmneziaWG, .json by Xray and sing-box clients, and .vpn only by AmneziaVPN.

Button names and format limitations were checked against the OpenVPN, WireGuard, Amnezia, Xray and sing-box documentation on November 17, 2026.

If you only need the file to get a VPN working, it's easier to do without it. We recommend BessyConnect: the app sets up the connection by itself, with no files or keys to handle manually. Download BessyConnect from the download page, where versions for iPhone, Mac, Android and TVs are collected.

What kinds of VPN files are there and what opens them?

The file format is determined by the protocol. An app for a different protocol will either reject the file or import it with an error, so look at the extension first.

FormatProtocolWhat's insideWhat opens it
.ovpnOpenVPNthe directives remote, proto, certificates in <ca>, <cert>, <key> blocksOpenVPN Connect (Windows, macOS, Android, iOS)
.confWireGuard[Interface] and [Peer] sections: private key, address, DNS, the server's public key, Endpointthe WireGuard app
.confAmneziaWGthe same as WireGuard, plus the obfuscation parameters Jc, Jmin, Jmax, S1–S4, H1–H4AmneziaWG, AmneziaVPN
.jsonXray (VLESS, Reality) or sing-boxinbounds, outbounds, routing blocks (route in sing-box)v2rayNG ("Import from file"), AmneziaVPN for Xray Reality
.vpnAmneziaVPN's own formatsettings for the Amnezia apponly AmneziaVPN
.mobileconfigApple profilesystem settings, including VPNiPhone Settings

The WireGuard file is the simplest of all. According to the format description in the wg(8) manual, there's only one required field in the [Interface] section: PrivateKey. It looks like this:

[Interface]
PrivateKey = <закрытый ключ этого устройства>
Address = 10.0.0.2/32
DNS = 1.1.1.1

[Peer]
PublicKey = <публичный ключ сервера>
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0

In this example, the two placeholders mean "this device's private key" and "the server's public key".

An Xray config is entirely JSON: the Xray documentation states outright that the configuration is written in JSON format, and the same goes for sing-box. Such files are usually written by the server administrator. Ordinary users are more often given not JSON but a vless:// link; more on that below.

How the protocols differ in speed and resistance to blocking is covered in the comparison VLESS, OpenVPN or WireGuard.

If by "VPN file" you meant the app's installation file (an APK for Android), that's something else. There are two safe sources: the official app store and the developer's website. What happens with builds from third-party channels is explained in the article on cracked VPNs in APK form.

How to open an ovpn or conf file on a computer?

On Windows and Mac, just double-click a .ovpn file or drag it into the OpenVPN Connect window. A .conf file is imported with the "Import tunnel(s) from file" button in the WireGuard app.

OpenVPN Connect, Windows and macOS:

  1. Install OpenVPN Connect from the official OpenVPN website.
  2. Double-click the .ovpn file or drag it onto any screen of the app. The OpenVPN documentation describes these two methods only for Windows and macOS.
  3. If the file doesn't open with a double-click, open the menu, go to My Profiles, click "+", choose Upload File and select the file.
  4. Confirm the import with OK and turn on the profile.

WireGuard on Windows:

  1. Install WireGuard from the official website.
  2. Click "Import tunnel(s) from file" or press Ctrl+O. The file picker accepts .conf files and .zip archives with several configurations.
  3. Select the tunnel in the list and click Activate.

On a Mac, the WireGuard app installs from the App Store, and the menu item has the same name: Import Tunnel(s) from File. An AmneziaWG file won't load into regular WireGuard (the reason is below). For it you need the AmneziaWG app: according to the Amnezia documentation, on a Mac it requires macOS 12 or later, and the button is called "Import tunnel(s) from file".

VPNs on Windows and Mac in general, without files, are covered in the guide VPN on PC.

How to import a VPN file on Android and iPhone?

On a phone, first save the file to Files or Downloads, then open it with the "+" button in the app. On the first connection, the system will ask you to allow adding a VPN configuration; that's normal.

Menu item names in the official apps:

AppAndroidiPhone
WireGuard"+" → Import from file or archive, or Scan from QR code"+" → Create from file or archive, or Create from QR code
AmneziaVPN"+" or "Let's get started" → "File with connection settings"the same
OpenVPN Connectmenu → My Profiles → "+" → Upload Filethe same
v2rayNG (Xray)add menu → "Import from file", "Import from QR code" or "Import from clipboard"no app; v2rayNG is Android-only

The steps for AmneziaVPN, according to the official guide:

  1. Transfer the .conf or .json file to your phone.
  2. Open AmneziaVPN and tap "+", or the "Let's get started" button if there are no connections yet.
  3. Choose "File with connection settings" and select the file.
  4. Tap "Continue", then "Connect".

According to the Amnezia documentation, the AmneziaWG app on Android runs on Android 7.0 and later. System methods for adding a VPN without a file, through the phone's settings, are described in the guide how to add a VPN.

A .mobileconfig profile is installed differently on iPhone, through the system settings. According to Apple's support article, after downloading it, open Settings, tap "Profile Downloaded", then "Install". If you don't install the profile within 8 minutes of downloading it, the iPhone deletes it by itself.

How are a QR code and a subscription link different from a file?

A QR code is the same configuration file, just encoded into an image. A subscription link is an https://… address from which the app downloads and updates the server list by itself. Amnezia's vpn:// key and a vless:// link also replace a file.

The WireGuard developers point out in the Android app how to make a QR code from a file: with the command qrencode -t ansiutf8 < tunnel.conf. So a photo of a QR code sent in a chat reveals the same as the file itself, including the private key.

A subscription has one advantage, but an important one: if a server gets blocked, a replacement arrives with the next update, and there's nothing to re-import. v2rayNG warns about this: "Do not use the insecure HTTP protocol in the subscription address". The address should start with https://.

For its own services, Amnezia recommends the key specifically: according to its documentation, connecting with a vpn:// key in AmneziaVPN is "more convenient than importing a configuration file", and files are needed where keys aren't supported, for example in AmneziaWG and on routers. How vless:// keys work and where to paste them is explained in the article VPN key.

Why won't the configuration file import?

Most often the file has been opened in the wrong app: an AmneziaWG config in regular WireGuard, extra lines in a .conf, or .ovpn certificates stored separately. Less often the cause is an old app version or the same configuration on several devices.

What you seeCauseWhat to do
WireGuard on iPhone or Mac: "Unable to import tunnel"the file has lines that aren't on the app's list. In the [Interface] section it only accepts PrivateKey, ListenPort, Address, DNS, MTUif the file contains Jc, S1, H1, it's AmneziaWG: open it in AmneziaWG
WireGuard on Windows: "Invalid key for [Interface] section"the same cause: AmneziaWG parameters or a typo in a field nameAmneziaWG instead of WireGuard
WireGuard on Android: import error with an unknown attributethe app doesn't know the PreUp, PostUp lines or AmneziaWG parametersremove the script lines or use AmneziaWG
OpenVPN Connect can't find the certificatethe .ovpn refers to the files ca.crt, client.key, but they aren't next to itput the files in the same folder or embed them in the .ovpn as <ca>, <cert>, <key> blocks
OpenVPN Connect on a phone reports unsupported optionsdirectives the mobile app doesn't have: dev tap, fragment, secret, socks-proxyremove the directive; unused lines are listed in the connection log, in the UNUSED OPTIONS section
OpenVPN Connect won't accept the filethe file is larger than 256 KB or not saved in UTF-8re-save it in UTF-8 without anything extra
AmneziaVPN: "Not installed" under the connection namean AmneziaWG 3.1 configuration in an app older than version 5.0.1.5update AmneziaVPN
It worked, then stopped everywhereone file was added to several devicesa separate file for each device

The last point doesn't apply only to Amnezia, but there it's described explicitly: the Amnezia Premium guide says that if the same file is added to several devices, "the connection will stop working on all of them".

If the file imported but the connection won't establish, the problem is no longer the file but the server or the network. The Amnezia documentation says WireGuard has fixed packet headers and predictable sizes, by which DPI systems easily recognize it and can break the connection. That's why AmneziaWG appeared: the obfuscation parameters change how the traffic looks, while the cryptography is still WireGuard's.

Is it safe to open someone else's VPN file?

Someone else's file is exactly as safe as your trust in its author. The server owner sees which addresses you connect to, and commands can be written into the file that will run on your computer. The Amnezia documentation says it plainly: don't use configuration files from public sources, as they can be used to intercept personal data.

Two things about the formats that are rarely explained:

  • OpenVPN can launch programs. The up directive runs a command after the tunnel comes up. According to the OpenVPN manual, by default (script-security 1) the client is only allowed to call built-in system utilities, while the line script-security 2 allows user scripts. If you see the lines script-security 2, up, down or route-up in someone else's .ovpn, don't import it.
  • WireGuard on Windows disables scripts by default. The PreUp, PostUp, PreDown, PostDown lines run only if an administrator has manually created the DangerousScriptExecution registry key. The developers warn that the commands then run as Local System, with the highest privileges on the system.

Before importing, open the file in Notepad or TextEdit; it's plain text. Also check the DNS line (whose server will answer your requests) and AllowedIPs: according to the wg(8) manual, the value 0.0.0.0/0 covers all IPv4 addresses, meaning all traffic will go through the tunnel.

And the flip side: your own file is a password. A .conf contains the private key, and a .ovpn often contains the client certificate and key. Whoever gets the file or a photo of its QR code can connect in your place.

Why we recommend BessyConnect

For people looking for a VPN file just to start using a VPN, we recommend BessyConnect. No files, keys or subscriptions to handle manually: you install the app, choose a server, and the connection sets itself up.

  • Nothing to lose or forward. There's no file with a private key that could leak along with a photo of a QR code.
  • A resilient protocol. VLESS with Reality camouflage: traffic looks like ordinary HTTPS, not like a recognizable WireGuard tunnel.
  • Spare servers. There are more than 100 servers, so there's plenty to choose from if one is overloaded.
  • No logs are kept, registration is optional, and there's a trial period.

Apps:

Now about the limits. There's no BessyConnect app for Windows. A Windows computer can be connected through a router, since BessyConnect can be set up on a router; there's a guide for a Keenetic router. The app isn't in the Russian App Store, so on iPhone you need an Apple ID from another country. And BessyConnect doesn't replace a work VPN: if your employer gave you a .ovpn to access the internal network, that file is needed specifically for it, and you should open it in OpenVPN Connect.

Import a file from work or from your own server following the tables above. But if you're looking for a file to open a blocked website or protect your connection on public Wi-Fi, we recommend BessyConnect instead. Download BessyConnect from the download page: the connection will set itself up without a single file.

Frequently asked questions

What opens an ovpn file? The OpenVPN Connect app: on Windows and Mac by double-clicking or dragging it into the window, on a phone via My Profiles → "+" → Upload File. You can view its contents in any text editor.

Can I open an AmneziaWG file in WireGuard? Only if the obfuscation parameters in it are turned off: then, according to the Amnezia documentation, the configuration is compatible with WireGuard. If the file has Jc, S1 or H1 lines, you need AmneziaWG or AmneziaVPN.

Why won't a VPN configuration file import on iPhone? Most often the file is opened in the wrong app, or it contains lines the app doesn't know, such as PostUp. Check the extension and open the file in the app for its protocol.

Can I use one VPN file on several devices? It's better not to. A WireGuard server identifies a client by its key and replies to the last address packets came from, so two devices with one file interfere with each other. The Amnezia Premium guide says a shared file stops working on all devices at once.

Do I need a configuration file for BessyConnect? No. BessyConnect sets up the connection by itself: install the app from the App Store or Google Play and connect. There's no Windows app; a computer can be connected through a router.

Related articles