Setup a VPN Server with Pritunl on Ubuntu 18.04

English Articles Eki 15, 2018

Pritunl is VPN server software that is built on the OpenVPN platform. This guide will show you how to setup the software and get it running on your own server. We will working on Ubuntu 18.04 LTS. Let's start. :)

Before we started; if you use apache or a app that use to tcp/80 and 443 ports, make sure that you stopped it. If it's not, we should run the following commands.

sudo systemctl stop apache2 (or any app)

Now, we will be adding a Pritunl repository.

sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
deb bionic main

Then, we will adding the public keys for the repositories.

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

Now to reload the repositories.

sudo apt update

We will install the packages and start the Pritunl server.

sudo apt-get --assume-yes install pritunl mongodb-server

sudo systemctl start pritunl mongodb ; sudo systemctl enable pritunl mongodb

Yes, our Pritunl VPN Server is ready. However, if we want to use this server, we should configure that.


Now that the server is up and running, we need to setup and configure it for usage. Open your web browser and visit.

Pritunl has created self signed certified. Our browsers don't allow this certificates. We will pass manual.

And we finally saw our pritunl screen.

We will now receive our setup key from our server.

sudo pritunl setup-key

We're writing the key we have taken from the server.

Default username and password are "pritunl". We are writing and continue.

After that, we are proceed first configuration.

After completing this step, go to the 'Users' tab. To connect to Pritunl, you would need to create an organization and a user. So add an organization first, then add a user to the newly created organization.

Now go to the 'Servers' tab and click on Add a server.

Enter a name for your server. Use the protocol and port you selected earlier while configuring your firewall. If you don't configure your firewall with that values, Pritunl cannot connect. Now click "Add" and proceed.

Now click on Attach Organization to attach this server to the organization created earlier. If this is done, click on Start Server.

You have completed the configuration of your Pritunl VPN server.

You can connect to the server using any OpenVPN compatible software. Pritunl provides clients for Linux, Windows, and Mac. You can use any of them.

Finally, to get the configuration files for your OpenVPN client, go to the Users tab and download the configuration file for the user you want. That's all. :)


Java Developer | @Turkcell

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.