How to Install PiVPN on OpenMediaVault 5 using Raspberry Pi 4

In this segment, we are going to show you “How to Install PiVPN on OpenMediaVault 5 using Raspberry Pi 4

What is PiVPN Server?

PiVPN (Virtual Private Network) is one of a few different ways you can access a Raspberry Pi remote computer. By using PiVPN we can easily create our own VPN server and that will help us in the absolute easiest way to install and run your own VPN.


What is OpenMediaVault?

OpenMediaVault (OMV) is a free Linux distribution designed for network-attached storage (NAS). The project’s lead developer is Volker Theile, who instituted it in 2009. OMV is based on the Debian operating system and is licensed through the GNU General Public License v3.

Source /> Wikipedia

OpenMediaVault 5 NAS Server

OpenMediaVault Versions :

Equipment Required Optional
Raspberry Pi Raspberry Pi 4 Case
SD_Card SD Card Keyboard
Ethernet Ethernet Cable Mouse
Charger Power Adapter    
HDD External HDD    
Shop now

You can Buy the Raspberry Pi 4 Kit from here

Package Required to Install

  • PiVPN – OpenVPN installer & management tool


  • First of all, we need of open Wireless Network Watcher to access the IP Address of our Raspberry Pi.
  • Then we need to open the SSH console Putty and type the IP Address to connect the DietPi CLI.
  • After we login to DietPi, you need to type a command to access the dietpi-software.
  • Now, navigate to Software Optimized and select PiVPN by using the Spacebar and press OK.


  1. Setup Static IP and note down the IP Address.
  2. Select User Name
  3. Enable the Unattended Upgrades
  4. Select UDP protocol, Bevideo it is Faster than TCP
  5. Now, Select the Port Number. 1194 is the Default Port you can type any other port that you want.
  6. Select the Default Level of Encryption if you select a higher level of Encryption, the key will be strong but take more time to create.
  7. Now, Select your Public IP Address If you have a static IP Address then Choose the first option. Otherwise, we need to set up a Dynamic DNS.
  8. Now, we need to select DNS Provider. You can select the Default Option.
  • Then navigate to Install and press OK. After that installation will take around 5-10 min to complete setup.
  • Once the setup is complete the system will reboot to finalize the settings.

Setting up Port Forwarding on Router

  • To forward the port on the router, we need to know the IP Address of our router.
  • To check the router IP Address use Wireless Network Watcher and it will display the router IP Address. wireless-network-watcher
  • Type this IP Address in your browser and it will open the login page for your router.
  • Now, you need to enter the username & password and log in to your router.
  • If you don’t know the username & password of your router you can always ask your ISP.
  • For personal routers, you can always check online for the default username & password for the router.

Setting up Dynamic DNS

  • First of all, we need to visit the DUCKDNS website to create a Free Dynamic DNS for our Public IP.


  • You can use any of the above methods to log in to the DUCKDNS website and create a subdomain for your website.
  • Once you log in you can create a subdomain for your Public IP Address.
  • You can use it to visit OMV on the Internet.


  • For example, in my case I have created omvpcmac as my subdomain, So, I can access it as
  • You can create 5 subdomains on Duck DNS account for free.

Add Clients to the VPN Server

  • Command: pivpn add
  • Type the User Name and then Password 2 Times.

Download Client File

  • Location : home/dietpi/opvns
  • Tools Used to Download Client Files
  • Otherwise, just share the folder over the network.
  • cd home/dietpi/opvns
  • Type ls to check whether the file is created or not.
  • Once, you see your file type python -m SimpleHTTPServer 8080
  • This command will share the current folder over the Network.
  • You can download the file by typing the IP Address:8080 in your web browser.

Configure OpenVPN Client

  • You can directly download OpenVPN software from the download link.
  • After the download finishes, you can install the software as shown in the video.
  • Once, the installation finishes you need to open the software by clicking on it and choosing Run as Administrator
  • Default Path to save the .ovpn file or we can say configuration files: C:\Program Files\OpenVPN\config
  • Now, you can save your downloaded configuration files to the config folder and then it will appear in the VPN Client.
  • Then we can select the configuration file by clicking on it and entering the password to connect to it.
  • If the password is correct you can easily connect to the server and the OpenVPN icon changed its color to green.

Download & Setup VPN Software for Android

  • Open PLAYSTORE on your Android Device and look for OpenVPN for Android.
  • If the app is already installed in your device it will ask you to open the app.
  • Otherwise, it will give you an option to install the app.
  • Once the OpenVPN for Android app is installed use the downloaded config file to connect to the VPN server.

Note: The default file extension of the configuration file is .ovpn. Now, You are ready to use the PiVPN Server with DietPi on your Raspberry Pi. Enjoy using it and share your thoughts. Smile (“_”)

Did you find us helpful?

Support us on Patreon, Follow us on Facebook

Harish Kumar

As a founder of the PcMac YouTube channel and website, Our goal is to provide Free Technical help to people and spread knowledge to everyone.
0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments