Get ExpressVPN on your Linux.
Need a VPN for Linux?
Get ExpressVPN Now
Refer a friend to use ExpressVPN.
Love ExpressVPN? Want a free month?
Refer a Friend Now

This guide will show you how to manually set up ExpressVPN on Linux using the OpenVPN protocol with ExpressVPN’s configuration files.

Not all ExpressVPN locations may be available for manually configured connections. To use the full list of VPN locations, use the app setup.

Important: The OpenVPN manual configuration does not offer the same security and privacy benefits as the ExpressVPN app. If you are located in a country with a high level of internet censorship, you are recommended to use the ExpressVPN app for a more stable VPN connection.

Prefer app setupSee the instructions for setting up the ExpressVPN app for Linux.

Jump to…

1. Find your ExpressVPN account credentials
2. Install and connect to the VPN
Disconnect from a VPN server location


1. Find your ExpressVPN account credentials

Go to the ExpressVPN setup page. If prompted, enter your ExpressVPN credentials and click Sign In.

Enter your account credentials, then click "Sign In."

Enter the verification code that is sent to your email.

On the right, with OpenVPN already selected for you, you will see your username, password, and a list of OpenVPN configuration files.

With "OpenVPN" selected, you will see your username, password, and a list of OpenVPN configuration files.

Click the location(s) you want in order to download the .ovpn file(s).

Keep this browser window open. You will need this information for the setup later.

Need help? Contact the ExpressVPN Support Team for immediate assistance.

Back to top


2. Install and connect to the VPN

Refer to the corresponding section for your Linux distro below.

Note: The following steps were tested on Ubuntu 20.04 LTS (Focal Fossa).

To install the packages, enter the following in the Terminal window:

$ sudo apt install openvpn openvpn-systemd-resolved

Enter your password. Then, enter Y to continue.

Enter “Y” to continue.

To launch OpenVPN, enter the following:

$ sudo openvpn --config /[path to file]/my_expressvpn_[server location].ovpn --script-security 2 --up /etc/openvpn/update-systemd-resolved --down /etc/openvpn/update-systemd-resolved --dhcp-option 'DOMAIN-ROUTE .' --down-pre

Note: Replace [path to file] with the path to where the ExpressVPN configuration file was downloaded, and [server location] with the location shown in the file name.

Enter the username and password you found earlier.

After you are connected to ExpressVPN successfully, you will see the words “Initialization Sequence Completed.”

After you are connected to ExpressVPN successfully, you will see the words “Initialization Sequence Completed.”

To keep the VPN connection active, keep the Terminal window running in the background.

Need help? Contact the ExpressVPN Support Team for immediate assistance.

Back to top

Note: The following steps were tested on Debian 10 (Buster).

To install the packages, enter the following in the Terminal window:

$ sudo apt install openvpn resolvconf

Enter your password. Then, enter Y to continue.

Enter “Y” to continue.

To launch OpenVPN, enter the following:

$ sudo openvpn --config /[path to file]/my_expressvpn_[server location].ovpn --script-security 2 --up /etc/openvpn/update-resolv-conf --down /etc/openvpn/update-resolv-conf

Note: Replace [path to file] with the path to where the ExpressVPN configuration file was downloaded, and [server location] with the location shown in the file name.

Enter the username and password you found earlier.

After you are connected to ExpressVPN successfully, you will see the words “Initialization Sequence Completed.”

After you are connected to ExpressVPN successfully, you will see the words “Initialization Sequence Completed.”

To keep the VPN connection active, keep the Terminal window running in the background.

Need help? Contact the ExpressVPN Support Team for immediate assistance.

Back to top

Note: The following steps were tested on Fedora 38. These steps should also work for CentOS.

To install the packages, enter the following in the Terminal window:

$ sudo dnf install openvpn

To configure DNS, enter the following:

$ sudo cp /usr/share/doc/openvpn/contrib/pull-resolv-conf/client.{up,down} /etc/openvpn/

$ sudo chmod +x /etc/openvpn/client.{up,down}

$ sudo sed -i -e 's|\bresolvconf\b|ignore-&|' /etc/openvpn/client.{up,down}

To launch OpenVPN, enter the following:

$ sudo openvpn --config /[path to file]/my_expressvpn_[server location].ovpn --script-security 2 --up /etc/openvpn/client.up --down /etc/openvpn/client.down

Note: Replace [path to file] with the path to where the ExpressVPN configuration file was downloaded, and [server location] with the location shown in the file name.

Enter the username and password you found earlier.

After you are connected to ExpressVPN successfully, you will see the words “Initialization Sequence Completed.”

To keep the VPN connection active, keep the Terminal window running in the background.

Need help? Contact the ExpressVPN Support Team for immediate assistance.

Back to top


Disconnect from a VPN server location

To disconnect, enter Ctrl + C in the Terminal window.

Need help? Contact the ExpressVPN Support Team for immediate assistance.

Back to top

Was this article helpful?

We're sorry to hear that. Let us know how we can improve.

A member of our Support Team will follow up on your issue.