How to Make Your Own VPN For Free (Updated 2020)Last Updated by Joel Timothy on October 01, 2020
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.
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.
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.
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.
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.
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 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 (most user-friendly)
- Amazon EC2
- Amazon Lightsail
- Microsoft Azure
- Google Compute Engine
- Scaleway, and
- DreamCompute or other OpenStack-based cloud hosting.
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:
So let’s get started.
Step I : Create an Amazon Web Services Account
- Head over to and click “Create a free account.”
- After creating and logging in, Click Services > IAM. The option is found under the Security, Identity, & Compliance tab.
- Click the “Users” tab on the left.
- Click “Add User.”
- Create a user name, and click the box next to “Programmatic Access.” After that, click Next.
- Click Attach existing policies directly.
- Type in “admin” to search through the policies. Find “Administrator Access” and tick its checkbox. After that, click Next.
- 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)
- Go to Settings.
- Select Update & Security, then click For Developers.
- Set the Developers mode option to “”
- After everything installs, click Control Panel, then select Programs.
- Click to turn Windows features on or off
- 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.
- On Mac and Linux Download Algo and unzip the file wherever you want on your machine. This creates a folder called algo-master.
- 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:
- Type the following:
$ python -m ensurepip –user
$ python -m pip install –user –upgrade virtualenv
On Linux (deb-based):
$ sudo apt-get update && sudo apt-get install \
python-virtualenv –yFor Windows, we have already set up this in part 1.
- 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.
- 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.
- Start the deployment. Return to your terminal. Type in ./algo to start the installation process. You will be asked a couple of questions.
- 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.
- 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.
- 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.
Your VPN should now start running. From there, your data should be secured from prying eyes.