Steps To Set up Pritunl VPN Server and Client on Ubuntu 22.04
1. Dependencies For Pritunl VPN Server
First, you need to update and upgrade your local package index with the command below:
# sudo apt update
# sudo apt upgrade -y
Then, use the following command to install the required packages:
sudo apt install gpg curl gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates -y
At this point, you need to add the MongoDB and Pritunl VPN Server repositories on your Ubuntu 22.04. To do this, follow the steps below.
2. Add MongoDB GPG Key and Repository on Ubuntu 22.04
Import MongoDB APT repository keys to your system by using the following
curl -fsSL https://www.mongodb.org/static/pgp/server-5.0.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-5.gpg
Next, use the command below to add the MongoDB repository:
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
3. Add Pritunl GPG Key and Repository on Ubuntu 22.04
Now you need to use the command below to import the Pritunl GPG keys:
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7AE645C0CF8E292A
Output
gpg: key 7AE645C0CF8E292A: public key "Pritunl <contact@pritunl.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
Then, use the following command to add the Pritunl repository on Ubuntu 22.04:
echo "deb http://repo.pritunl.com/stable/apt $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/pritunl.list
4. Install Pritunl and MongoDB on Ubuntu 22.04
At this point, you need to run the system update and install the Pritunl and mongo-server packages:
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
# sudo apt update
# sudo apt install mongodb-org pritunl -y
Now use the commands below to start and enable the services:
# sudo systemctl start pritunl mongod
# sudo systemctl enable pritunl mongod
5. Configure and Access Pritunl VPN Server on Ubuntu 22.04
At this point, you can access your Pritunl VPN server web interface by typing your server’s IP address in your web browser:
http://your-server-ip
You should see the following screen:

Pritunl database setup
You’ll need Setup Key to continue. To do this, run the command below in your terminal:
sudo pritunl setup-key
Output
ca3e792f00744afaa4bb004f993b9487
Enter your setup key and click Save. Then, you will see the Pritunl VPN Server sign-in screen on Ubuntu 22.04.

Pritunl sign-in screen
At this point, you need to run the command below to get your default username and password:
sudo pritunl default-password
Output
Administrator default password:
username: "pritunl"
password: "LHuOvpxapXc3"
Enter the username and password on the login screen and click Sign in. You will see the initial setup page where you can change the admin user and password, set the domain and Let’s Encrypt SSL. When you are done click Save or you can set it up later.

Initial Setup
At this point, you can configure the organizations, users, and servers from the Pritunl dashboard on Ubuntu 22.04.

Users and Organizations
To create a new organization click on ‘Add organization’ then specify a name and ‘Add’.

Add Organization
Add VPN Server To Pritunl
At this point, you can create a VPN server on Ubuntu 22.04 by clicking on ‘servers’ and then ‘Add server’.
Provide the server information required then click ‘Add’.

Add Server
Finally, you need to attach the server to an organization by clicking on ‘Attach organization’ and choosing your organization.

Attach organization
Add Users To Pritunl
At this point, you can click on ‘Add user’ to create a user profile on your VPN server on Ubuntu 22.04. Enter the information that is needed and click Add.

Add User
Note: To add many users at once, use the ‘Bulk Add user’ function on the web interface.
6. Set up Pritunl VPN Client
At this point, you can visit the Pritunl VPN clients page and choose one for your client machine to download and install. The installation part is described on the official page.

Pritunl Client
Once the VPN client has been installed, log in to the Pritunl VPN server to download the user profile. Click on ‘Users’ select the particular user and click on the download icon to get the user profile.

Download User Profile
Locate the user’s profile .tar file downloaded and import it or you can use the Client URL, then you’ll be able to connect to the Pritunl VPN server.

Import Client Profile

Pritunl VPN Client
That’s it, you are done.