Pritunl is a free and open-source VPN server that allows you to securely connect to your network from remote locations. In this tutorial, we’ll show you how to install and configure Pritunl on CentOS 8.
Before starting, make sure that you have a fresh installation of CentOS 8, with the latest updates and patches applied. You will also need a domain name and a valid SSL certificate for your VPN server.
Step 1: Install the required packages
To install Pritunl, you need to install several dependencies, including MongoDB and the EPEL repository. To do this, run the following commands:
sudo yum install epel-release
sudo yum install mongodb-server mongodb
Step 2: Install Pritunl
Next, add the Pritunl repository to your system and install Pritunl using the
yum package manager:
gpgkey=https://repo.pritunl.com/stable/yum/centos/8/repodata/repomd.xml.key" | sudo tee -a /etc/yum.repos.d/pritunl.repo
sudo yum install pritunl
Step 3: Start and enable the MongoDB and Pritunl services
To start the MongoDB and Pritunl services, run the following commands:
sudo systemctl start mongod
sudo systemctl start pritunl
To make the services start automatically at boot, run the following commands:
sudo systemctl enable mongod
sudo systemctl enable pritunl
Step 4: Configure firewall rules
Pritunl uses several ports for its various services, such as HTTP (port 80), HTTPS (port 443), and OpenVPN (port 1194). To allow access to these services, you need to configure your firewall to allow incoming traffic on these ports.
To do this, use the
firewall-cmd command to add the necessary rules:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=1194/tcp
sudo firewall-cmd --reload
Step 5: Access the Pritunl control panel
After the installation is complete, you can access the Pritunl control panel by opening a web browser and going to
your-server-ip with the IP address or hostname of your server.
You will be prompted to enter a username and password to log in. The default username is
admin, and the default password is
Once you are logged in, you can start using Pritunl to configure your VPN server.
That’s it! You should now have Pritunl installed and configured on your CentOS 8 server. If you have any questions or run into any issues during the installation process, don’t hesitate to ask for help.
© 2022 Aqua Networks HK Limited
All rights reserved.
Proudly made in Hong Kong.