How To Install Pritunl VPN Server on Ubuntu 20.04 LTS

Install Pritunl VPN Server on Ubuntu 20.04

In this tutorial, we will show you how to install Pritunl VPN Server on Ubuntu 20.04 LTS. For those of you who didn’t know, the Pritunl VPN server is a free, open-source enterprise VPN server that anyone can use to set up a secure VPN tunnel across networks. It provides a simple and user-friendly web interface and has the ability to create a wide range of cloud VPN networks. It provides an official client package and supports all OpenVPN clients for most devices and platforms.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the Pritunl VPN Server on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Install Pritunl VPN Server on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade
sudo apt install curl gnupg2 wget unzip

Step 2. Installing Pritunl VPN Server on Ubuntu 20.04.

Now we add the Pritunl repository key and file to the Ubuntu system:

sudo apt-key adv --keyserver hkp:// --recv E162F504A20CDF15827F718D4B7C549A058F8B6B
sudo apt-key adv --keyserver hkp:// --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A

Next, add its repository file using the following command:

echo "deb focal main" | sudo tee /etc/apt/sources.list.d/pritunl.list

Once the repository is added, update the repository cache and install the Pritunl server with the following command:

sudo apt update
sudo apt install pritunl

Once the installation completes, you can set up the start, stop and enable the Pritunl VPN server to automatically start up when the server boots:

sudo systemctl stop pritunl
sudo systemctl start pritunl
sudo systemctl enable pritunl

Step 3. Installing MongoDB.

By default, MongoDB is not available in the Ubuntu 20.04 default repository so you will need to add the MongoDB repository to your system:

curl -fsSL | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

Update apt and install MongoDB using the following command:

sudo apt update
sudo apt-get install mongodb-server

Step 4. Accessing Pritunl.

Now, open your web browser and access the Pritunl web Interface using the URL https://your-server-ipaddress. You should see the following screen:

Install Pritunl VPN Server on Ubuntu 20.04

Next, generate a setup key using the command below:

sudo pritunl setup-key


from cryptography import x586

After that, copy the setup key and paste it to the Pritunl database setup wizard. After paste the setup key, click on the Save button.

Next, you will need to generate a default username and password to sign in. To do that, run the following command:

sudo pritunl default-password


from cryptography import x586
[undefined][2021-03-09 12:09:16,430][INFO] Getting default administrator password
Administrator default password:
username: "pritunl"
password: "meilana123"

Now login with the default username and password, and setting up your environment from Pritunl dashboard.

Congratulations! You have successfully installed Pritunl VPN. Thanks for using this tutorial for installing the Pritunl VPN Server on your Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Pritunl website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!