How to Make Your Own VPN For Free (Updated 2019)

Published by Joel Timothy on March 08, 2019

Online privacy has become a key topic of discussion in today’s world, with ISPs and government agencies keenly monitoring user activities. This has become even worse with data retention laws being drafted to allow ISPs to store and share your private data with advertisers and other interested parties.
Network vpn The whole privacy story has seen many netizens resort to VPNs in a bid to protect their privacy and gain some level of anonymity as they go about their online activities.

However, while going for one of the top VPNs like ExpressVPN or NordVPN is always a good idea, you don’t have to rely on commercial VPNs to protect your privacy.

The good thing is you can easily create your own cloud VPN server at home and avoid being monitored by ISPs and other snooping eyes.

Why create your own VPN?

Creating your own VPN can sound quite complicated, but it doesn’t need you to be a developer to do it. Yes it will need you to get a bit technical, but in the end you the benefits will be worth it.

Cheap

You can set up your own private VPN without paying a fee with Amazon AWS, at least for the first year. Even if you decide to go for a hosting service like DigitalOcean, what you will pay is just a fraction of what you would have paid for premium VPN services.

Disposable VPNs

Just like all other VPNs, you will be shifting your data from your ISP to your cloud provider. However, with your own VPN, you can boot up a new VPN server and connect to it in minutes. After that, you can just delete your instance, and it will be like the VPN server never existed.

Better privacy

By being disposable, your VPN will have greatly enhanced your privacy. Further, you won’t be putting your data in the hands of VPN providers, who can then share it with partners or advertisers. Though you still can’t trust Amazon and the like for the privacy of your data, you can trust that they won’t sell your hosting data to advertisers and scammers.

However, it’s important to note that setting your own VPN in the cloud doesn’t help you bypass content restrictions.

For such, you will need to go for a VPN that doesn’t keep any logs and is good at unblocking services like Netflix, Hulu, iPlayer, etc. Two of the best VPNs for privacy and streaming are ExpressVPN and NordVPN.

Nevertheless, with your own VPN, you will still be able to encrypt and protect your data, which is quite enough for most of us. The great thing is that your data will also be pretty much in your own hands and you can also easily destroy it.

Creating your own VPN

There are many projects out there that let you create your own secure tunnel, and one of the best and most popular is Algo VPN. Basically, it’s a set of scripts that enables you to set up an encrypted connection to a cloud server.

Algo vpn

Algo VPN was designed by the folks at Trail of Bits, and it’s meant to be easy to use while at the same time offering maximum security. One great thing about Algo is that you can use it to create a disposable VPN.

Still, there are other options like Streisand, which even helps you set up an integrated Tor bridge among a few other privacy-focused features. For this guide, we will however stick with Algo VPN as its widely accepted as the best and most secure.

Apart from Algo, you will also need to have a cloud server that you will install your VPN on. You can choose one of the following cloud services that Algo supports:

DigitalOcean is the easiest to use, and it goes for $5 a month. If you want something free, you can opt for Amazon EC2 which offers a free first year. There are however quite a number of limitations.

  • You get 750 hours per month. This can be enough for one device, but it might quickly accumulate if you want to use the server on multiple devices.
  • You will be limited to 15GB of bandwidth per month, which means that you have to avoid downloading or streaming a lot of huge files.
  • After your free year expires, you will be switched to an hourly rate.

DigitalOcean is quite stable in terms of pricing and it’s the easiest to use, but since we all love free and are probably just experimenting with a self-setup VPN, we’ll start off with Amazon EC2.

How to create your own VPN on the cloud

Algo VPN automates the VPN installation process such that you won’t have to establish an SSH connection with a server and run complicated command lines.

Here’s the outline of creating your own VPN:

  1. Create a free account at Amazon Web Services. If you like, you can also link your current Amazon account.
  2. Download Algo VPN on your local computer and unzip it
  3. Install the Algo VPN dependencies
  4. Run the installation wizard
  5. Set up your devices to connect to the VPN

So let’s get started.

Step I : Create an Amazon Web Services Account

  1. Head over to and click “Create a free account.
  2. After creating and logging in, Click Services > IAM. The option is found under the Security, Identity, & Compliance tab.
  3. Click the “Users” tab on the left.
  4. Click “Add User.”
  5. Create a user name, and click the box next to “Programmatic Access.” After that, click Next.
  6. Click Attach existing policies directly.
  7. Type in “admin” to search through the policies. Find “Administrator Access” and tick its checkbox. After that, click Next.
  8. On the last screen, click the Download CSV button. This file includes a couple of numbers and access keys you’ll while setting up Algo. Click Close and you’ll be all set.

Step II-IV : Download and Install Algo dependencies

Algo installation is done using the command line on your Windows, Mac, or Linux computer. However, Windows users will need to install the Windows Subsystem for Linux so that Algo can work.

Part 1: (For Win 10 users)

Windows subsystem for Linux can only be installed on Windows 10.

(If you are using Mac or Linux, you can skip to part 2)

  1. Go to Settings.
  2. Select Update & Security, then click For Developers.
  3. Set the Developers mode option to “”
  4. After everything installs, click Control Panel, then select Programs.
  5. Click to turn Windows features on or off
  6. Scroll down, select the box next to Windows Subsystem for Linux, then click OK. Windows will install the program, then reboot.

Linux Bash has been installed, and it should be available when you type “Bash” on the start menu. Open it and answer the few questions that you’ll be asked. Windows will then install another set of software.

After the process is complete, you’ll be at the command line. Type the following and press enter.

sudo apt-get update && sudo apt-get install python-pip python-setuptools build-essential libssl-dev libffi-dev python-dev python-virtualenv git -y

Now, clone the repository with this command:

git clone https://github.com/trailofbits/algo && cd algo

After that, skip down to step 5 of Part Two below.

Part 2: All Users

You can easily install Algo on Mac. However, on Linux, the commands that you’ll need depend on the version of Linux you are running. You can figure out which you need for Linux here.

We have however listed the instructions for deb-based Linux.

  1. On Mac and Linux Download Algo and unzip the file wherever you want on your machine. This creates a folder called algo-master.
  2. Open Terminal, then type in cd followed by the “algo-master” directory location. To make this easy, you can just type cd and then drag and drop the algo-master directory into Terminal. You should have something like this:
    cd /Users/Joeltimothy/Documents/algo-master
  3. Type the following:
    On macOS:
    $ python -m ensurepip –user
    $ python -m pip install –user –upgrade virtualenv
    On Linux (deb-based):
    $ sudo apt-get update && sudo apt-get install \
    build-essential \v
    libssl-dev \
    libffi-dev \
    python-dev \
    python-pip \
    python-setuptools \
    python-virtualenv –yFor Windows, we have already set up this in part 1.
  4. Install Algo’s remaining dependencies. Use the same Terminal window as the previous step and run:
    $ python -m virtualenv –python=`which python2` env &&
    source env/bin/activate &&
    python -m pip install -U pip virtualenv &&
    python -m pip install -r requirements.txt

    On macOS, you may be prompted to install cc. You should press accept if so.
  5. List the users to create.
    Type in sudo nano config.cfg and press Enter.
    This will open up a text editor. Under users, type the name of any users you’d like to create. This list is important if you want to share the VPN with friends or you want to use it in multiple devices, so go ahead and make a list.
    After that, press Ctrl+X to save and exit.
  6. Start the deployment. Return to your terminal. Type in ./algo to start the installation process. You will be asked a couple of questions.
  7. For the provider, type in 2 for Amazon EC2 (unless you went with a different provider). After that, enter any name for your VPN and choose the server location. It is advisable to stick to a server close to you for maximum performance.
  8. After that, open the CSV file you downloaded from Amazon, and grab your AWS Access Key and your AWS Secret Key. Copy/paste each number from that file when you’re asked.
  9. Now, Algo will ask you about VPN On Demand. If you want your VPN to connect automatically, say “Yes.” Otherwise, you can still connect it manually when you need it. For the security enhancements, say Yes too. All the other preferences are up to you to decide what works for you. Regardless of what you choose, the VPN will work just fine.

After that, Algo will now install itself on the cloud server. When complete, it will let you know.

The last step is now connecting your devices to use your new VPN.

Step V : Configure Your Devices for your VPN

For each device you want to use with the VPN, you need to set up a profile or certificate. The process will vary depending on the device, but all files you need are contained in that “algo-master” directory inside the “configs” folder.

Setting up your VPN on Apple devices

The configuration file we need for either Mac or iPhone/ iPad is the .mobileconfig file.

For Mac, just double-click it and it will install the profile on your Mac.

For iOS, you need to open the same file on your device. You can Airdrop it, email it to yourself, upload it to a cloud service etc. and then open it. Confirm the profile installation, and you’ll be connected. To disconnect, just delete the profile.

Setting up your VPN on Android devices

For Android, you need to install the strongSwan VPN Client app. After that, find the P12 file inside the Configs folder, and send it over to your Android device then open it using strongSwan. It will direct you from there. In case of any trouble, this guide will walk you through each part.

Setting up your VPN on Windows

Setting up the VPN on windows is a little more complicated than the other devices, but it’s still doable.

  1. At the config folder, copy the PEM, P12, and PS1 files to another location.
  2. Double-click the PEM file to import it to the Trusted Root certificate store.
  3. Open the Windows Powershell, then navigate to the folder with the files you copied in step one.
  4. Type in, Set-ExecutionPolicy Unrestricted -Scope CurrentUser and press Enter.
  5. Type in the name of your Powershell script and press Enter. This should look like windows_$usernameyoumadeup.ps1. Follow the directions displayed.
  6. Finally, after that step is complete, type in Set-ExecutionPolicy Restricted -Scope CurrentUser and press Enter.

Your VPN should now start running. From there, your data should be secured from prying eyes.

However, to bypass geo-restrictions and access content freely, you will need a premium VPN like ExpressVPN or NordVPN.

Joel Timothy
Joel is an online privacy advocate, writer, and editor with a special interest in cyber security and internet freedom. He likes helping readers tackle tricky tech and internet issues, as well as maximize the boundless power of the internet.