install expressvpn on raspberry pi

ExpressVPN on Raspberry Pi: The Ultimate Guide

ExpressVPN is a trustworthy solution used to install a VPN client on a Raspberry Pi or any computer. I used it at work for years, and I love it. But the installation on Raspberry Pi is not as straightforward as on PC, even if they have a package for Raspberry Pi OS, so I wrote this tutorial to explain every step.

ExpressVPN can be installed on Raspberry Pi OS by downloading the corresponding package on the official website. There is no graphic interface, everything is done via the command line.

Let’s start with some important prerequisites before jumping to the installation part, and then I’ll explain how to use ExpressVPN once installed on your system.

If you’re looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.

What you need to install ExpressVPN on Raspberry Pi

Here are the prerequisites to install ExpressVPN on a Raspberry Pi. Some may seem obvious, but others are essential and less evident:

  • An ExpressVPN account.
    Yes, ExpressVPN works with a paid subscription. It’s not that expensive, but you need an account and your activation code before going further.
    There is a 30-day money-back guarantee, so you don’t take any risk by testing it out.
    There are other VPN providers you can try (I tested a few of them here), but ExpressVPN is one of the most serious options (installation, support, reliability, etc.).
  • A Raspberry Pi.
    The steps will be similar on any Linux computer, but I’m testing this tutorial for you on a Raspberry Pi 4. It should work with any model. No desktop environment is required, so even a Raspberry Pi Zero is fine.
  • A good SD card or USB drive (links to my favorite products).
    Nothing special here, but if it’ll be an important node of your network later, it’s essential to choose the right storage. You want something reliable.
  • Raspberry Pi OS (32 bits) installed.
    Yes, at the time of writing, ExpressVPN doesn’t work with the 64-bit version.
    I tested with Bullseye 32-bit, and it’s ok, so I guess it’s safe to start with this.
    It should work with the Lite edition if you don’t need a desktop environment (server or gateway).

    If you already have another 32-bit distribution, it might work on it, I just didn’t test them all.
    For example, you can also use it with LibreElec, which I explain at the end of this article.

    They also have a manual installation method, where you can use the OpenVPN client and a configuration file. This might work on a 64-bit distribution if you don’t have other options.
    Here is the link to the documentation.

Once you have everything set up, we can move to the installation part.

Install ExpressVPN on Raspberry Pi

Download the ExpressVPN package

The first step is to go to the ExpressVPN website, and get the package for Raspberry Pi OS from the Downloads page,:

If like me, you’re following this tutorial from your computer, you can right-click on the Download button to copy the direct link to the file (once Raspberry Pi OS is selected), and then use it via SSH or VNC.
For example, use wget to download the file from a terminal:

Don’t copy this command directly, please change the file version according to the one given on the website.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember and a free downloadable cheat sheet so you can have the commands at your fingertips.

Get the ExpressVPN license key

While you are on the website, you can log in and go to your Dashboard to get the activation code you’ll need later. It looks like this:

Keep it safe, you’ll need it later.

Install ExpressVPN in a terminal

Once the package is downloaded, we can install it.

Join Our Community!

Connect, learn, and grow with other Raspberry Pi enthusiasts. Support RaspberryTips and enjoy an ad-free reading experience. Get exclusive monthly video tutorials and many other benefits.

Learn more

If you have a desktop environment, just double-click on the file and choose to install it from the popup window:

Or, if you prefer to use the command line, you can use dpkg to install it.
It should be something like:
sudo dpkg -i expressvpn_3.34.1.0-1_armhf.deb
Don’t forget to change the version number depending on the one you got.

It should be installed directly, without any errors or missing prerequisites (at least I did it on a fresh install, and it worked perfectly). As mentioned earlier, this is a package for the “ARMHF” architecture, so using it on “ARM64” won’t work (more details about the difference between Raspberry Pi OS 32 and 64 bits here).

Activate ExpressVPN

Finally, you need to activate your ExpressVPN license before going any further. None of the commands I’ll give you later will work without it.

To do this, simply open a terminal and type:
expressvpn activate

Paste the activation code you got earlier from your account, and that’s it, ExpressVPN is now installed and activated on your Raspberry Pi. Ready to use!

Note: You get a message there telling you about the Chrome and Firefox extensions, but in my experience, none of them work on Raspberry Pi OS, as we don’t use the same versions as on PC (it’s Chromium and not Chrome for example).

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Using ExpressVPN on Raspberry Pi

Unfortunately, there is no graphic interface for ExpressVPN on Raspberry Pi. Using it is not complicated, though, there are only a few commands to do everything you need.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Here is a list of the most important ones:

  • Connect:
    expressvpn connect
    You’ll be connected automatically to the “best” server available (what they call “Smart location”).

    It will often be the closest one, I guess there is some evaluation of availability and speed to decide which one it will be.
  • Disconnect:
    expressvpn disconnect
    Disconnect from ExpressVPN, and get back to your normal Internet access.
  • Connect to a specific location:
    Start by getting a list of the servers available:
    expressvpn list

    Then use either the country name or the location name to get access to it:
    expressvpn connect [country]
    expressvpn connect [location]

    Here is one example:
    expressvpn connect Germany

Once connected, you can check that your public IP address has been updated with this online IP tool.
With my last command, it locates me in Germany, which is precisely the goal:

There is no need to use sudo for these commands, which is great.

I hope it’s working well on your side, let me know if you have any issues or questions (you can ask them in the community). But also check the next section, where I answer the most common ones.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.

Related questions

How to automatically start ExpressVPN on boot?

By default, ExpressVPN won’t start on boot. To change this, start ExpressVPN with the Raspberry Pi and connect to the latest location, you can use this command:
expressvpn autoconnect true

You can’t configure the server location, but it will use the latest one you tried manually, so it’s fine.

How to uninstall ExpressVPN?

To uninstall ExpressVPN on Raspberry Pi OS, just use the “Add/Remove software” tool or the command:
sudo dpkg -r expressvpn

How to use ExpressVPN on LibreElec (Kodi)?

ExpressVPN works on LibreElec (tested with the latest versions), but the setup is slightly different. You need to get the ExpressVPN username and password, as well as the OpenVPN configuration file from the manual installation procedure.

It’s a bit tricky, but here is the complete step-by-step procedure to do this.
First, get the information you need from ExpressVPN:

  • Go to this page of the ExpressVPN website.
    Get your username and password.
  • Then click on one server location and download the corresponding configuration file.
  • Transfer the configuration file to your Raspberry Pi.
    You may need to enable Samba or SSH to do this.

Then you need to add a new repository in Kodi. Here are the steps:

  • Go into the Settings menu and click on System:
  • Then choose “Add-ons” on the left menu.
  • And allow the “Unknown sources”:
  • A warning message appears, you can ignore it by clicking on “Yes”:
  • On your computer, download the following file: Zomboided repository.
  • Transfer it to the Raspberry Pi, like for the ExpressVPN configuration file.
  • Go to Settings again, and choose Add-ons:
  • Choose “Install from zip file” in the menu:
  • Click on “Home folder” and select the file you just uploaded:
  • A few seconds later, the repository is installed and ready to use.

Finally, install the VPN manager from this repository, so you can use it with ExpressVPN:

  • Back to the Add-ons menu, select “Install from repository“.
  • Click on “Zomboided Add-on Repository“:
  • Go into “Services“.
  • And install the “VPN Manager for OpenVPN” package:
  • On the next step, click on “Install” to start the installation:
  • A complete wizard will guide you through the installation.
    Asking for your provider (ExpressVPN), your credentials (login and password), and the country you want to connect to for your first profile.
    You can even choose to auto-start the VPN connection on boot:
  • It will then ask for the ExpressVPN username, password, and the configuration file you downloaded earlier.
    It should be in your home folder.
  • Once the configuration is complete, you’ll get a success message.

To make sure it’s working, you can check the weather widget on the home page of Kodi. If it gives you the weather forecast in Brazil (or whatever server you chose), it’s working :-).

Can I use a Raspberry Pi with ExpressVPN as a router/gateway for other computers?

Once ExpressVPN is installed on a Raspberry Pi, it’s possible to use the Raspberry Pi as a gateway to share the secured connection with other computers on the same network.

The procedure is not easy though, but I did it. I got the ExpressVPN IP address on my phone, even without using the ExpressVPN app. I use a wireless hotspot, created on the Raspberry Pi, to share the VPN connection:

This is a long procedure, so I won’t explain all the details here, but basically, the idea is to use one connection of the Raspberry Pi to connect it to ExpressVPN (Ethernet or Wi-Fi) and then configure the other connection to allow other computers to use it as a gateway.

I have an entire tutorial on this topic here: How to use Raspberry Pi as a Wireless Router with Firewall?
It explains how to create a Wi-Fi hotspot on a Raspberry Pi. If your Raspberry Pi is connected via the Ethernet connection and ExpressVPN is enabled, you can follow the same steps.

The only change will be that ExpressVPN creates a virtual interface (tun0) for the VPN connection, so you need to redirect the traffic to this interface instead of the wireless interface directly (wlan0).
For example, with iptables:
sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

It’s not something I would recommend to beginners, but it’s possible if you are looking for a new challenge :-).

Update: I actually wrote a whole tutorial on this website on how to set up your Raspberry Pi as a VPN gateway. It’s not that complicated with the right tutorial. Check it out if you’re interested.

Whenever you’re ready, here are other ways I can help you:

The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts