How to set up Surfshark VPN on Raspberry Pi

In this tutorial, you will learn how to install the Surfshark VPN on Raspberry Pi.

 

You will need Raspberry Pi and an active Surfshark subscription to follow this tutorial. Don't have a subscription yet? You can get it on Surfshark pricing page.

NOTE: Some configurations may vary depending on the Linux distribution you are using.

 

You will learn how to:

  1. Get your credentials 
  2. Configure the OpenVPN client
  3. Ensure your connection is successful

 

Get your credentials

NOTE: These are not your regular credentials, such as your email address and password.

  1. Enter the Surfshark login page and log in. Then, click on VPN > Manual Setup. This is the page where all the details required for manual connection are stored.

  2. Click Desktop or Mobile > OpenVPN. Proceed to the Credentials tab. Click on the Credentials tab at the top.


    NOTE: Keep this page open for now. You will need these credentials a bit later.

Configure the OpenVPN client

 

  1. Open the Terminal by clicking CTRL + ALT + T.

  2. 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.

  3. Navigate to the OpenVPN directory by entering the following command: 
    cd /etc/openvpn

  4. Download the Surfshark OpenVPN Configuration files:
    sudo wget https://my.surfshark.com/vpn/api/v1/server/configurations

  5. Extract "Surfshark_Config.zip":
    sudo unzip configurations

  6. Remove the .zip file as we will not use it anymore.
    sudo rm configurations

  7. To see the list of all available servers, enter:
    ls

  8. 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

  9. Enter the Surfshark service credentials (refer to Get your credentials section in this article).

  10. If you can see the Initialization Sequence Completed message, you have successfully connected to Surfshark.

 

Ensure your connection is successful

 

Let’s see if your connection is successful after setting up a VPN. You can do it by performing an IP leak test and a DNS leak test on our website.

 



You may also be interested in:

 

Was this article helpful?
Thank you for your feedback!