• Get Surfshark
  1. Download
A bearded man in a gray hoodie holding a blue circuit board and standing next to a speech bubble with a checkmarked shield.

Set up a VPN on Raspberry Pi

  • 3200+ servers in 100 countries
  • RAM-only server infrastructure
  • Industry-leading encryption
Get Surfshark
30-day money-back guarantee

Get Surfshark for all devices

Surfshark offers unlimited simultaneous connections, which means you can protect all your devices at the same time. Don’t limit your VPN use to Raspberry Pi. Download the app on all your devices and stay private whenever you’re online.

What is Raspberry Pi?

Raspberry Pi is a series of pocket-sized, single-board computers that started off as a tool for teaching computer science. Thanks to their affordable price point and relatively powerful processors, Raspberry Pi computers are often used as servers, retro gaming machines, and even desktop PCs.

What is Raspberry Pi?

Keep your online activities private

Protect your Raspberry Pi with a premium VPN

Get Surfshark
30-day money-back guarantee
Keep your online activities private

How to set up a VPN on Raspberry Pi

Surfshark does not have a standalone app for Raspberry Pi; however, you can test your basic tech knowledge and complete a simple manual setup using the credentials provided to you with your Surfshark account. Here are the steps you need to take:

  • Open Surfshark’s manual setup page;
  • Choose the Desktop or mobile option, then tap on OpenVPN;
  • The new window shows your manual setup credentials. Keep them open for now;
  • Open the Terminal by clicking CTRL + ALT + T;
  • Install the necessary OpenVPN packages by entering the following command:
    sudo apt-get install openvpn unzip;
  • If you are requested to enter a password, please enter your computer’s admin password.
  • Navigate to the OpenVPN directory by entering the following command:
    cd /etc/openvpn;
  • Download the Surfshark OpenVPN Configuration files:
    sudo wget https://my.surfshark.com/vpn/api/v1/server/configurations;
  • Extract “Surfshark_Config.zip”:
    sudo unzip configurations;
  • Remove the .zip file as we will not use it anymore.
    sudo rm configurations;
  • To see the list of all available servers, enter:
    ls;
  • Choose one of the servers from the server list and connect to Surfshark by entering:
    sudo openvpn [file name]
    For example:
    sudo openvpn us-dal.prod.surfshark.com_udp.ovpn;
  • You will be asked to enter the credentials here. Enter the Surfshark service credentials that you collected at the start of the setup process;
  • If you can see the Initialization Sequence Completed message, you have successfully connected to Surfshark.

Once you’re done with the setup, it’s a good idea to check if your connection was successful. To do so, simply visit the What is my IP page or use any other IP checking tool. If your connection was successful, these tools should show the VPN server’s IP address and location instead of your actual data.

Why use a VPN for Raspberry Pi?

Industry-leading encryption

The encryption algorithm forms a basis for a VPN’s security. Surfshark uses AES-256 encryption for OpenVPN and IKEv2, as well as ChaCha20 for WireGuard. Both are currently industry-leading algorithms for their respective VPN protocols.

A vast network of servers

Surfshark has 3200+ servers in 100 countries worldwide. Server crowdedness and the distance between you and the server are key factors when it comes to connection speed. And with Surfshark, you’ll always be able to find an uncrowded server nearby.

No activity logs

Surfshark VPN doesn’t collect or store any user activity data. Whatever you do online is your own personal matter. Our VPN encrypts and hides your data from prying eyes, all backed up by a strict no-logs policy, so you can rest assured that no data will get leaked.

RAM-only servers

100% of our server infrastructure is RAM-only. Since there are no hard drives in our servers, all data within them gets permanently erased whenever a server is turned off. So even if someone managed to physically breach Surfshark’s servers, they wouldn’t get anything out of it.

Kill Switch

Kill Switch is a feature that shuts down your internet connection if your VPN connection drops. It protects you from leaking any sensitive data in case something goes wrong with the VPN. If you prioritize an uninterrupted internet connection, you can simply toggle the Kill Switch off in the settings.

Secure VPN protocols

VPN protocols are rulesets that establish the way in which your VPN connection works. Surfshark uses OpenVPN, IKEv2, and WireGuard VPN protocols. All of them are open-source and have no known vulnerabilities. Either is a great choice for a fast, reliable, and secure VPN connection.

Premium VPNs vs. PiVPN

PiVPN allows you to set up your Raspberry Pi to function as a VPN server. Since all traffic is routed through your device, it’s a great way to remotely access your home network and files on your home computer whenever you’re traveling. It also makes your data appear as if it’s coming from your home network, even when you’re away.

That said, a PiVPN doesn’t hide your activity or IP, and your ISP can see exactly what you’re doing. A premium VPN like Surfshark encrypts your data and hides your IP, which makes your connection much more private and secure. On top of that, premium VPNs offer loads of additional features, none of which are present with a PiVPN.

Premium VPNs vs. PiVPN

Try Surfshark risk-free

Try Surfshark and all of its features without risking your money! We offer a 30-day money-back guarantee, so pick your subscription and start using Surfshark worry-free. If you feel like our services aren’t up to par with your expectations, you can get your money back before the 30-day period is over.

Get Surfshark
Try Surfshark risk-free

Frequently asked questions

Yes, Raspberry Pi computers can run a VPN with a fairly simple manual setup. The computer itself can also function as a VPN server if you want to build a completely independent network, typically referred to as PiVPN. However, PiVPN isn’t as secure or private as using a premium VPN service on Raspberry Pi.

The benefit of using a VPN on Raspberry Pi is the same as on any other device. A VPN encrypts your traffic and hides your IP address, making your connection to the internet private and secure.

Some free VPNs do provide credentials for a manual setup on Raspberry Pi, but that doesn’t mean that you should use them. Free VPNs pose quite a few security and privacy risks, all while usually being relatively slow and unreliable.

In most cases, you’ll be better off going with a premium VPN, which ensures a safe and private connection to the internet, as well as faster connection speeds and more servers in more locations to connect to compared to their free alternatives.

VPN deal that Rocks

Get % off + mo. EXTRA
Get VPN Deal