How To Set up PiVPN on Debian 11

In this article, we want to teach you How To Set up PiVPN on Debian 11.

What is PiVPN?

PiVPN is a program that can be used to install and configure an OpenVPN server on your Raspberry Pi. It takes only a few minutes for setting it up. By using PiVPN you can browse the web safer when you are at unsecured public Wi-Fi networks.

Also, you can communicate with devices connected to your home network by using PiVPN. Alternatively, if you set it up in your office and want to work from home, you would be able to use all the tools and services in the office through the VPN. If you are traveling abroad where some services are geo-blocked for that region, you can potentially be able to access them via your home network using PiVPN.

How To Set up PiVPN on Debian 11

As we mentioned PiVPN setup will take a few minutes. Follow the steps below to complete this guide.

You need to run the commands as root.

Install PiVPN on Debian 11

First, you need to create a new user. To do this, run the following command, you can choose your desired name:

adduser vpn

Then, run the following command to install PiVPN as the root user:

curl -L | bash

During the installation try to keep the settings to the default. Then, it will automatically find your new user and add it as the default storage for the VPN profiles.

When your installation is completed let’s see how to use it.

How To Use PiVPN on Debian 11

At this point, you are ready to Add and Remove VPN profiles. To add a profile, use the PiVPN command on Debian 11:

pivpn add

You will be asked to enter a name for the client.

Enter a Name for the Client: orca
::: Client Keys generated
::: Client config generated
::: Updated server config
::: WireGuard reloaded
::: Done! orca.conf successfully created!
::: orca.conf was copied to /home/vpn/configs for easy transfer.
::: Please use this profile only on one device and create additional
::: profiles for other devices. You can also use pivpn -qr
::: to generate a QR Code you can scan with the mobile app.

To view the list of the PiVPN profiles on Debian 11, run the command below:

pivpn list
::: Clients Summary :::
Client Public key Creation date
orca 3O1Q1aKDCHL0lOJj64zr1Jw6/QXndxV+zxK+PPMZlB4= 03 Mar 2022, 04:40, EST
::: Disabled clients :::

Anytime you decided to remove a user, you can use the command below:

pivpn remove orca
Do you really want to delete orca? [y/N] y
::: Updated server config
::: Client config for orca removed
::: Client Keys for orca removed
::: Successfully deleted orca
::: WireGuard reloaded

To get more information about PiVPN options, you can run the command below:

pivpn --help


At this point, you learn to Set up PiVPN on Debian 11.

Hope you enjoy it.

May you will be interested in these articles:

Install and Use Visual Studio Code on Debian 11.

How To Install and Secure Redis on Debian 11.

How To Install and Secure phpMyAdmin on Debian 11.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay informed and not overwhelmed, subscribe now!