How to auto run Surfshark on every boot

Hi guys,

I am using Surfshark vpn. On phone and windows there is gui app.

On linux, there is only terminal command

What I want to know, is there a way to make some script or something to auto run it on every boot ?


I’m pretty sure someone has made an AppImage for SurfShark, have you tried searching for those?

Also, what Desktop Environment do you use? KDE has an AutoStart feature.

I searched, but didn’t find anything for that…or I don’t understand something correctly.


Alright. Would you mind giving me the command? (the one that you type to connect)

1 Like

There are only few commands, the rest is some kind of menu.

More info here Linux VPN (for Ubuntu): Easy Setup for 2021 - Surfshark

Maybe that is even not possible :pleading_face:

I’m in China right now so I can’t visit any VPN website. You should be able to make a script with the following lines:

surfshark connect...?

and add it into the AutoStart list. It’s in System Settings > Startup and Shutdown > Autostart > Add

That doesnt work :

Warning: Could not find ‘/home/manjaro/Desktop/’, starting ‘/bin/ba
sh’ instead. Please check your profile settings.

Correct command is

sudo surfshark-vpn
Then I need to enter my email and password.

and then need to connect to one of the servers :
To connect to a server:

  1. After you launched Surfshark, you’ll see a list of server locations, each with a number. Enter that number and press Enter to connect to that server.
  2. You’ll be asked to choose between the UDP and TCP protocol. UDP is generally faster, so type in the number associated with UDP and press enter.

To disconnect from a server:

  1. Type in sudo surfshark-vpn down in the terminal and press Enter. That’s it!

Other useful commands:

  1. To show all possible Surfshark commands, enter sudo surfshark-vpn help .
  2. To check your connectivity, enter sudo surfshark-vpn status .
  3. To quickly connect to your fastest/optimal server, enter sudo surfshark-vpn attack .
  4. To establish a Multihop connection, enter sudo surfshark-vpn multi .

Try to import the vpn profile given in the website to be used with OpenVPN.
That way you can auto-connect on any network!

Open a terminal, then input nm-connection-editor, then hit image the + icon.

May then select the last option which is import VPN configuration.

After which you navigate to the downloaded profile, select it, and enter the credentials found on the surfshark VPN website’s dashboard!

1 Like

Ok, I tried all of that. I have VPN connection available in my network, I press connect, but nothing happened

Hm, have you entered all required credentials, may I ask?

Oh, may I ask for additional information regarding the situation, please?

Thank you!

I am using surfshark for a week now. I had the same stuggles.

Don’t forget to accept acces to ALL users when you add a .openvp.

I am using three connections at the same time.
One connection starts on boot.
The other two i can activate manualy in network-manager.

At the same time. exprimenting::
On Vbox iam running freedombox openvpn with surfshark, also connected to two connections. All different locations.

I still have to figger out how to auto login into surfshark without network-manager gui on freedombox.

The speed of the service is amazing. :slight_smile: nice day.


1 Like