Source - Photo by Kevin Paster

Self-host Outline VPN in 5 minutes

Outline VPN May 6, 2023

Introduction

Outline VPN is a free and open-source virtual private network (VPN) software developed by Jigsaw, a subsidiary of Alphabet Inc. (Google's parent company). The software allows users to set up their own VPN server on a cloud host, such as Amazon Web Services (AWS), Digital Ocean, or Google Cloud Platform (GCP), using their own account credentials.

Outline VPN provides secure and encrypted access to the internet, protecting users' online activities and data from prying eyes. The software is designed to be easy to use and customizable, allowing users to configure their VPN server to suit their specific needs.

Outline VPN also includes features such as split-tunneling, which enables users to route some internet traffic through the VPN and some through their regular internet connection, and multi-platform support, with clients available for Windows, macOS, iOS, and Android devices.

We will be going to learn the following things:-

  1. Installing Outline Manager Before self-hosting on the server.
  2. Self-hosting on the server.
  3. Configuring the firewall to allow TCP and UDP connection.
  4. Installing the client to connect to the server.
  5. Generate keys for the client.
Source - Link

Installing Outline Manager Before self-hosting on the server. (Optional)

If you want to skip this step in starting then just move to self-hosting on the server.

Go to https://getoutline.org/en-GB/get-started/#step-1

Scroll down to see these options

And download it according to your device.

Or you can direct click on links below

  1. Windows Link
  2. GNU/Linux Link
  3. MacOS Link

So you might be thinking what is the reason we are downloading this first not setting up the server right?

The same question came up in my mind but differently. How to setup a server for Outline then I got a few lines of script to execute in order to set up Outline VPN using docker.

But I don't want you all to set up server blindly. So telling you all in starting only from where we get those 2-3 lines which we will be going to execute in upcoming steps.

After Installing you will see this type of screen

In this you can choose from various available platforms or can directly setup using the Advanced option.

Now it's time to setup the server.

So let's move to our next step.

Self-hosting on the server

As I told you we will be going to get few lines we need to execute in order to setup outline vpn.

Prerequisites before we start.

  1. Docker 🐟 and docker-compose should be installed on the server.

To install docker just type

sudo apt update (This command will check for the updates)
sudo apt install -y docker.io (This will install docker.io from the repository)
sudo apt install -y docker-compose (This will install docker-compose)

And just read https://docs.docker.com/engine/install/linux-postinstall/

Now let's come back to the topic

So after clicking on advanced option from outline manager we will see something like this.

If I didn't ask you to install outline manager before. Then you might be thinking about from where we got this line for setting up outline vpn server.

Now it's time to paste this line which we can see in step one of this screenshot.

sudo bash -c "$(wget -qO- https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.sh)"

Paste this line to the terminal (Shortcut CTRL+SHIFT+T) and hit your enter key.

And as soon as you press enter key it will

Source - https://pin.it/1S3x6o3

not blast.

And start few docker containers which will make your job easy to do.

Now wait for a couple of minutes ⏰.

Source - https://pin.it/3fu7E1K

In the end you will see few ports to open from your firewall. And will also see a string or api url asked in step 2 of the outline manager. Β 

Similar to this

Copy this api url and paste it your outline manager.

And don't forget to allow the listed ports by Outline script.

Configuring the firewall to allow TCP and UDP connection

Do some online search about how to allow ports in IPTABLE or UWF according to your system firewall. If you are not able to let me know in the comment section.

Installing the client to connect to the server

Go to this url https://getoutline.org/en-GB/get-started/#step-3 and download the outline client for your device to get connected through your VPN.

you will various options download accordingly.

Generate keys for the client

Now come back to the outline manager. I hope you have completed the above steps.

  1. Installing docker🐟 and docker-compose.
  2. Running the one-line script for installing outline vpn.
  3. Pasting the API URL to your outline manager.
  4. Allowing listed ports through the firewall πŸ”₯.

Now you will see a similar interface like this

Click on add new key and start and it will ask for the name of key πŸ—οΈ just enter. And click on share icon to share the access πŸ” key with client.

So what's next? 🧐

Just paste the access key to client. And you are done πŸ₯³.

Thanks for reading this article.

Tags