TV, smartphone, game controller, router, laptop and tablet computer connected to a shield with Surfshark logo on it.

A Virtual Private Network (VPN) can make you secure and private online. However, setting up a VPN can be frustrating for those without prior VPN experience. It doesn’t have to be, though. In fact, you almost always have the option to either set up a VPN manually or use a VPN app that will do it for you. With that in mind, this simple guide will teach you how to set up VPN connections on any device in just a few minutes!

The easiest way to set up a VPN:

To set up a VPN as a regular user, you should download and install a VPN app from a VPN supplier of your choice.

If you want to do it manually, you need to get a location configuration file from a VPN server that you can use with the WireGuard app — of course, this only works for WireGuard VPNs. Each VPN protocol — IKEv2, OpenVPN, etc. — has different procedures.

Table of content

    Setting up a VPN manually

    Before diving in, does manually setting up a VPN sound like a daunting task? Then the best option is to use a VPN service provider that offers VPN apps. That way, you’ll already know to install a VPN — and accomplish it with a couple of clicks. Surfshark VPN offers applications for a wide range of devices, so you don’t have to worry about manually setting up your VPN or reading the rest of this guide.

    Note: it is not possible to set up a VPN without anyone providing the server. These guides are for using certificates provided by your VPN provider (you can find Surfshark’s on your account page).

    The first thing about VPN configuration is getting the certificates for your device and OS. Once you have them, we can proceed to set up a VPN with them.

    How to set up a VPN on Windows

    Most VPN services provide a Windows VPN app. So that’s the easiest way to set up a VPN configuration. If your VPN service doesn’t offer a VPN app, here’s how to set up a VPN using WireGuard for Windows:

    1. Get a key pair and location configuration;
    2. Download the WireGuard app;
    3. Install the WireGuard app;
    4. Open the WireGuard app and choose Import tunnels from file;
    Click the big obvious IMPORT TUNNEL(S) FROM FILE button
    1. Open the configuration file you obtained in step #1; 
    Choose the configuration file that you downloaded previously and click OPEN
    1. To name the new connection, click Edit, enter the new name, and click Save; 
    click the EDIT button
    Enter the chosen name in the NAME: field and click SAVE
    1. Connect to the VPN by clicking Activate. Disconnect by clicking Deactivate; 
    Click the ACTIVATE button
    1. As the kids haven’t said in more than 20 years now, you the man now, dog! The setup is finished. 

    Note: if you prefer OpenVPN, here’s how to set OpenVPN GUI app on Windows (it is meant for Surfshark but should work with any provider).

    How to set up a VPN on Mac

    Before setting up your VPN manually on a Mac, make sure your VPN provider doesn’t offer a Mac app for setting it up automatically. If your provider doesn’t have an app, here is how to set up a VPN manually using the WireGuard VPN protocol: 

    1. Get yourself a key pair and location configuration file (like from the VPN service’s website); 
    2. Download and install the WireGuard App from the App Store;
    3. Open the WireGuard app and click Import tunnel(s) from file;
    Click the IMPORT TUNNEL(S) FROM FILE button
    1. Select the Surfshark configuration you downloaded and click Import;
    Choose the config file you have downloaded and click IMPORT
    1. Click Allow on the pop-up;
    Click ALLOW in the pop-up.
    1. To name the connection, click Edit, enter the name you want in the Name field and click Save;
    2. Click Activate to connect to the VPN server. Disconnect by clicking Deactivate

    If you want to know more, we have all you need to know about setting up a VPN on macOS.

    How to set up a VPN on Linux

    Manually setting up a VPN on Linux takes time, so be sure your VPN provider doesn’t have a faster method, like a dedicated Linux VPN app, before getting started. If that isn’t the case, here’s how to manually set up a VPN on Linux using OpenVPN:

    1. Open the terminal with Ctrl + Alt + T. Install OpenVPN first. To grab the packages, execute the following command: sudo apt-get install openvpn unzip. Enter your computer’s administrator credentials if asked for a password;
    2. To access the OpenVPN directory, run the following: cd/etc/openvpn;
    3. Download your VPN provider’s OpenVPN configuration files. If you know where those files are, run the command: sudo wget (replace the URL with your provider’s VPN configuration file location);
    4. Extract the configuration files from the zip folder with the command: unzip configs.View the list of available servers with the command ls;
    5. Connect to one of the listed servers using the following command: sudo openvpn [filename] (example: sudo openvpn;
    6. Contact your VPN provider if you are asked for service credentials. These are NOT your VPN account username and password;
    7. Once you see Initialization Sequence Completed in your Terminal Log, your connection is successful.

    Still have questions? We have answers about how to set up a VPN on Linux.

    How to set up a VPN on Android

    Setting up a VPN on an Android device is easy. But if you’re looking to manually set it up rather than allowing an app to automatically configure VPN on Android for you, here’s how to go about it:

    1. Get your provider’s OpenVPN configuration files. Extract the files to any directory;
    2. Download an OpenVPN client. For maximum security and convenience, use OpenVPN Connect. Once downloaded, select OVPN Profile;
    3. Open the menu in the top left corner. Click Import on the top right and open the configuration files folder you unzipped previously;
    4. Fill in the details:
      1. Title — name your connection.
      2. Username and Password — you’ll need service credentials, which your VPN provider should supply. Here are the credentials you need if you use Surfshark.
    5. Connect by clicking your new profile. Click OK if you’re asked if you trust the source of this service.

    How to set up a VPN on Android TV

    Some VPN services provide Android TV apps. Simply search for your VPN provider’s app on the Android market. If your VPN provider doesn’t offer a standalone app, you’ll need to do it manually with an OpenVPN GUI:

    1. On your Android TV, download OpenVPN Connect and Google Chrome from the Google Play Store;
    2. Download the OpenVPN configuration files from your VPN provider’s website. If you recently installed Google Chrome, you’ll need to allow it to write files to your device;
    3. To import, open OpenVPN Connect and click the downward-pointing arrow in the top right-hand corner;
    4. Pick the configuration files you have downloaded from your VPN service provider’s website and save them;
    5. Navigate back to your profile screen, click the newly uploaded file, and enter your VPN service credentials (These are not your usual credentials. You’ll need to get them from your provider). Click OK.

    Note: the OpenVPN GUI is usually used with a touch-screen or mouse; it might be difficult to maneuver with a gaming controller or remote. Also, you must re-open the OpenVPN software to disable the VPN or change VPN servers.

    Check out our guide if you want to know more about setting up a VPN on Android TV.

    How to set up a VPN on iOS

    While getting a VPN on iPhone directly from the App Store is the easiest way to set up your iOS mobile devices, here’s how to do it manually with the WireGuard protocol:

    1. Get yourself a key pair and location configuration file;
    2. Download and install the WireGuard app on the App Store;  
    3. Open the app and click Add a tunnel;
    4. Find the configuration file you downloaded in step #1 and import it; 
    5. Click Allow on the pop-up; 
    6. Toggle the switch next to the location to connect or disconnect from the VPN. 

    Need more information? Check out our guide on setting up a VPN on iOS devices.

    How to set up a VPN on Firestick

    The best way to use a VPN on Firestick is to download a VPN provider’s native app. Connecting manually requires more work. But it’s doable with the Firestick’s Android APKs! Here’s how to set up a VPN connection on Firestick: 

    1. Go to Settings > Device > Developer Options. Enable Allow Apps from the Unknown Sources option;
    2. Now navigate to the Search screen, and type in Downloader;
    3. Install and Launch the Downloader;
    4. Once you reach the main page, select the URL address bar and type in the website for your VPN service’s Android APK download. (For example,;
    5. Select Download.APK if it doesn’t start automatically;
    6. Once downloaded, launch the installer and follow through with the prompts. You’ll be required to add in your credentials for your VPN service (ask your provider for these, or get Surfshark’s on the account page);
    7. When completed, you’ll want to go back to Settings > Device > Developer Options, then disable Allow Apps from Unknown Sources.

    How to set up a VPN on Apple TV

    Apple makes it difficult to modify anything on its products. You’ll need smart DNS to use a VPN on your Apple TV. Verify that your VPN service provider has smart DNS enabled and provides you with the required IP address before following these steps:

    1. Go to Settings > Network;
    2. Select the connection your Apple TV is currently using to connect to the internet. In most cases, you’ll select Wi-Fi;
    3. Click on the network you’re connected to on the next screen;
    4. Select Configure DNS. Select Manual under Configure DNS;
    5. Enter the IP address your VPN Service provider gave you for smart DNS use.

    Read our dedicated guide to learn how to set up a VPN on Apple TV.

    Setting up smart DNS on Xbox and PlayStation

    Gaming consoles don’t support virtual private networks, but you can easily set up your Xbox or Playstation to use one if your VPN provider supports smart DNS. Smart DNS is not a VPN client and does not provide an encrypted tunnel, but it can unblock material like a VPN. Some VPN providers offer apps for manual setup on Xbox, Samsung TV, and other devices. Here’s how to do it manually:

    How to set up smart DNS on PlayStation

    1. Go to Settings > Network > Set up Internet Connection. Depending on your connection, choose Wi-Fi or LAN Cable;
    2. Select Custom for the internet connection setup;
    3. Select Automatic in IP Address Settings;
    4. For DHCP Host Name, choose Do Not Specify
    5. Click Manual on DNS Settings;
    6. Select Primary DNS, enter your VPN provider’s smart DNS IP address, then click Done. Smart DNS may be enabled in your Surfshark account;
    7. Click Next when prompted for the Secondary DNS address;
    8. Select Automatic in MTU Settings;
    9. Select Do Not Use use for Proxy Server;
    10. Test your internet connection. Then, turn off your PS4 and then restart it after 30 seconds.

    See our guide for more information about setting up a VPN on PlayStation.

    How to set up smart DNS on Xbox

    1. Navigate to Settings > Network > Network Settings > Advanced Settings > DNS Settings;
    2. Select Manual for IPv4 DNS;
    3. Enter your VPN’s smart DNS IP address. If you have a secondary DNS, enter it. In the DNS Settings view, under DNS, you’ll notice your new IP address;
    4. Update your device’s location. This update ensures that the DNS of the VPN server address you’re visiting matches your physical location. Select System > Language & Location. Set your device’s location to the server you’re trying to connect to, or rather, the DNS location you’re imitating;
    5. Restart your Xbox.

    How to set up a VPN on your router

    Setting up a VPN on your router has several benefits. First, you won’t have to bother getting all your devices connected to a VPN on your home network. By connecting the VPN to your router, you protect your whole network.

    Plus, you can bypass website restrictions and prevent surveillance from internet service providers! A VPN on a router isn’t as straightforward as downloading VPN apps, and the process differs depending on the type of router, but we do have a dedicated guide on how to set up a VPN on a router.

    Even if you don’t use Surfshark, the process should be fairly similar, if not identical, with other providers.

    How to set up a VPN server

    For the mad lads who want to set up a VPN server to use in manually setting up a VPN connection, there are several choices. If we rule out buying or leasing actual server hardware, you can use your computer as a VPN server or install one on your router (provided the router can do that). 

    Here’s a short overview of setting up a VPN server:

    How to set up a VPN server on Windows 

    1. You have to have a PC you will always keep on to maintain the VPN server; 
    2. Choose the method:
      1. Setting up a new connection via Network Connections settings and then taking care of port forwarding and such; 
      2. Install VPN server software from a source like OpenVPN;
    3. That’s it. 

    How to set up a VPN server on macOS

    1. Have a macOS computer or laptop you will always keep on to maintain the VPN server; 
    2. Download and install server software from a source like OpenVPN or WireGuard:
      • macOS server has been discontinued, and the official Apple support now suggests using software provided by OpenVPN et al.  
    3. That’s done.

    How to set up a VPN server on Linux

    1. Have a Linux computer or laptop you will always keep on to maintain the VPN server;
    2. Download and install server software from a source like OpenVPN or WireGuard:
      • As there is a dizzying variety of Linux distributions, check the VPN developer guide for the exact procedures here
    3. That’s it. 

    How to set up a VPN server on your modem

    1. Get the manual for your modem; 
    2. Check if it can support a server
    3. If it does, follow the steps in the manual to set up the server on your router;
    4. You’re done!

    Final thoughts: should I set up a virtual private network on my device?

    Knowing how to install a VPN can be no different than knowing how to install any other app. If you choose a good VPN supplier, they will have an app handy. Of course, manual setup is still a possibility. 

    If you’re still undecided, Surfshark makes configuring numerous devices a breeze. With applications for almost every operating system, platform, browser, and device and easy access to VPN settings, you probably won’t need the manual setup described above. Even then, Surfshark offers a 24/7 customer care crew that can assist you. Get Surfshark if you want a VPN subscription that easily works for all your devices.

    Streamline your VPN setup with an app

    With a 30-day money-back guarantee

    Get Surfshark


    How do you set up a VPN?

    You can set up a VPN in one of two ways: 

    1. Subscribe to a VPN provider and then use their provided app;
    2. Download the GUI app for a particular VPN protocol and then set it up. Unless you have a VPN server handy, you’ll still need one from a VPN provider to connect to. 

    Can you set up a VPN for free?

    No, you can’t set up a VPN for free you need to invest in buying a VPN server at least. Joining an already existing VPN infrastructure provided by a VPN service like Surfshark is both cheaper and faster. 

    What is the easiest way to set up a VPN?

    The easiest way to set up a VPN:

    1. Subscribe to a VPN service; 
    2. Download and install the app; 
    3. Connect to a VPN server; 
    4. Done. 

    How does a VPN work? 

    A VPN works like this:

    1. The VPN client on your device establishes a connection to the VPN server;
    2. Any data sent from your device is encrypted by the client; 
    3. The VPN server decrypts the data and forwards it online; 
    4. Any response is encrypted by the VPN server and forwarded to your device;
    5. VPN client decrypts the data.