Share your love
Free VPN Server For Ubuntu 24.04: Set Up Pritunl

If you are looking for a Free VPN Server For Ubuntu 24.04, Pritunl VPN Server can be a good option. It is a free, open-source VPN server that uses OpenVPN and WireGuard protocols to secure network connections. Pritunl has an easy-to-use and user-friendly interface that you can install and secure your network connection. To complete your Pritunl VPN Server setup on Ubuntu 24.04, proceed to the guide steps below on the Orcacore website.
Table of Contents
Set Up Pritunl: A Free VPN Server For Ubuntu 24.04
To start Pritunl VPN server installation, you must log in to your Ubuntu 24.04 as a non-root user with sudo privileges. If you want to create a sudo user, you can check How to Create a Sudo User on Ubuntu 24.04.
1. Install Required Packages for Pritunl Setup
First, you must run the system update and upgrade with the following command:
sudo apt update && sudo apt upgrade -y
Then, run the command below to install the required packages and dependencies for installing Pritunl on Ubuntu 24.04:
sudo apt install gpg curl gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates -y
Note: To install Pritunl, you must also install MongoDB on your Ubuntu system. For this purpose, proceed to the next step to add the latest MongoDB repository.
2. Add Latest MongoDB Repository To Ubuntu 24.04
At this point, you can visit the MongoDB Release page and check for the latest version of MongoDB. Then, you can import the MongoDB APT repository keys to Ubuntu 24.04 with the following curl command:
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-8.gpg
Next, you must add the MongoDB repository to Ubuntu 24.04 by using the command below:
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
Once you are done, proceed to the next step to add the Pritunl repository to your Ubuntu 24.04.
3. Add Pritunl Server Repository To Ubuntu 24.04
Now you can import the Pritunl APT repository keys by using the following command:
curl https://raw.githubusercontent.com/pritunl/pgp/master/pritunl_repo_pub.asc | sudo apt-key add -
Then, add the Pritunl repository to your Ubuntu 24.04 with the command below:
echo "deb http://repo.pritunl.com/stable/apt $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/pritunl.list
4. Install Pritunl on Ubuntu 24.04
At this point, you have added both MongoDB and Pritunl repositories. You can easily use the following command to install Pritunl and the MongoDB server packages:
# sudo apt update
# sudo apt install mongodb-org pritunl -y
Start and Enable Pritunl and MongoDB
Once your installation is completed, use the following commands to start and enable your services:
# sudo systemctl start pritunl mongod
# sudo systemctl enable pritunl mongod
You can check Pritunl VPN service is active and running with the following command:
sudo systemctl status pritunl

Also, you can check that your MongoDB service is active and running:
sudo systemctl status mongod

At this point, you can proceed to the next step to continue your Pritunl VPN server setup from the Web interface.
5. Configure Pritunl on Ubuntu 24.04 via Web GUI
Now you can open your desired web browser and follow the below URL with your Ubuntu 24.04 server’s IP address to continue Pritunl VPN Server setup:
http://your-server-ip
You will see the following screen:

As you can see, you need your Pritunl setup key. To get your Pritunl setup, from your terminal, run the following command:
sudo pritunl setup-key
In your output, you will get a phrase like this:
e93f1173574948b085a39f031a5805e6
Now, enter your setup key on the above screen and click Save.
Next, you will be presented with a login screen. From your terminal, you need to run the command below to get your default username and password for Pritunl:
sudo pritunl default-password
In your output, you should see something similar to this:
Administrator default password:
username: "pritunl"
password: "wAYnLtV94WmF"
Enter your login credentials and click Sign In.

Initial Setup for Pritunl VPN Server
After logging in, you will be presented with an initial setup screen. From there, you can change the admin user and password, set the domain, and use Let’s Encrypt SSL. When you are done, click Save, or you can set it up later.

At this point, you will see your Pritunl VPN server dashboard. From there, you can configure the organizations, users, and servers.

Add an Organization To Pritunl VPN Server
From your Pritunl dashboard, you can click on Users to add organizations. Users are mapped to servers in an organization. To create a new organization, click on ‘Add organization’, then specify a name and click ‘Add’.


Add a VPN Server with Pritunl
At this point, you can easily add a VPN server from your Pritunl dashboard. Click on Servers and Add Server.

Then, provide the server information and click Add.

Next, you will see the following screen. From there, you need to attach an organization. From there, attach your desired organization and click Attach.

Add Users To Pritunl VPN Server
At this point, you can click on Users to create a user profile on your VPN server:

Enter the information that is needed and click Add. Note that your PIN must be only digits.

Note: You can add many users at once by using the Bulk Add User function on the Pritunl dashboard.
6. Configure Pritunl VPN Client
At this point, you must 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. Here we have downloaded the Windows Client.

Once your VPN client is installed and configured, you need to log in to the Pritunl VPN server to download the user profile. To do this, click on Users from the dashboard, select the particular user, and click on the download icon to get the user profile.

Next, you need to launch your Pritunl VPN client app and choose the import 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. Press connect and enter your PIN code to connect to the server.

Note: Remember to start the server from the Pritunl VPN server dashboard (the server you have created).
Conclusion
Setting up a Pritunl VPN server on Ubuntu 24.04 is a straightforward process that offers a secure and scalable solution for managing VPN access. With its user-friendly web interface and robust OpenVPN and WireGuard support, Pritunl makes deploying and managing a VPN simple, even for those with limited networking experience. Once configured, it provides reliable encryption and user authentication, making it ideal for businesses or personal use.
Hope you enjoy it. Please subscribe to us on Facebook, X, and YouTube.
You may also like to read the following articles:
Install Linux Kernel 6.14 on Ubuntu 24.04
Compare Ubuntu 24.04 and Ubuntu 25.04 Features
Install Ubuntu 25.04 Plucky Puffin on VMware Workstation
Initial Settings After Installing Ubuntu 25.04
FAQs
What are the system requirements for installing Pritunl on Ubuntu 24.04?
Minimum 1 GB RAM and 1 vCPU are recommended. For production environments, at least 2 GB of RAM and multiple CPUs are preferred.
How do I secure my Pritunl installation?
Use HTTPS, set strong admin credentials, regularly update your server, and consider enabling 2FA for users.
Can I use Let’s Encrypt with Pritunl?
Yes, Pritunl supports automatic HTTPS certificates using Let’s Encrypt directly from the web UI.
What firewall ports need to be open for Pritunl?
Typically, TCP 443 (or your configured web port) and UDP 1194 (OpenVPN) or UDP 51820 (WireGuard) should be open.