PiVPN doesn't depend on a VPN server

Creating a bug report/issue

I have searched the existing open and closed issues - yes

Required Information

  • DietPi version | 9.16.0 beta
  • Distro version | trixie
  • Kernel version | Linux rock5b 6.1.115-vendor-rk35xx #1 SMP Tue Jun 3 13:10:51 UTC 2025 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | ROCK 5B (aarch64) or (EG: RPi3)
  • Power supply used | irrelevant
  • SD card used | nvme

Additional Information (if applicable)

  • Software title | PiVPN
  • Was the software title installed freshly or updated/migrated? fresh
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →

Steps to reproduce

  1. Install dietpi
  2. Install PiVPN

Expected behaviour

  • A VPN server is installed via dietpi-software before installing PiVPN - preferably WireGuard
  • PiVPN doesn’t install anything on its own accord

Actual behaviour

  • PiVPN just assumes OpenVPN is to be used
  • It installs it via apt
  • It’s not visible in dietpi-software
  • The user is confused why OpenVPN is the default while being inferior :grin:

Extra details

That’s not how the PiVPN script works. PiVPN itself checks possible options and offers to install Wireguard or OpenVPN. However, this selection depends on a number of factors. The main factor here is the Wireguard kernel module. If this is available, PiVPN also offers Wireguard as an option. If not, OpenVPN is installed automatically.

The entire PiVPN configuration is independent of the DietPi configuration. PiVPN uses completely different parameters and IP addresses than DietPi. Therefore, the configurations cannot be mixed. However, this has always been the case. You can either use PiVPN or the native VPN server apps from dietpi-software.

This statement is not correct, at least it changed a bit >> Release v4.6.1: Updates on maintenance ¡ pivpn/pivpn ¡ GitHub

OK, then would it not be sensible to install Wireguard as a dependency? Otherwise PiVPN doesn’t offer the option to use it at all (which confused me tbh).

Best to my knowledge, PiVPN don’t care about already installed Wireguard software. It checks for the kernel module. If this is not present, it will not offer Wireguard (I guess). But this is something to ask the PiVPN maintainer.

It does care though… it doesn’t offer Wireguard as an option at all if it was never installed. This can be replicated on a fresh dietpi install

This depends on SBC and kernel modules available.

The kernel module is available

In this case it would be an issue of PiVPN, not related to DietPi.

I see your point… I didn’t know that PiVPN used separate Wireguard configs.

But I still think this is a bit of a DietPi issue. Because, if you install Wireguard using dietpi-software, and then PiVPN, two wireguard tunnels are generated, sharing the same port, if I understand correctly? It is not clear that to use Wireguard through PiVPN, you need to install it through apt separately and that the config is not compatible with DietPi’s internal one.

nope

nope, PiVPN is goring to remove the DietPi configuration, as it is creating it’s own Wiregard server config file wg0.conf. This ia a behaviour of PiVPN.

There is a missunderstanding still

If Wireguard is not installed via PiVPN, PiVPN will not generate or use any Wiregard configuration, as it will use OpenVPN.

I did a test installation on my NanoPi R5S and I got ask by the PiVPN installer to select between Wiregiard and OpenVPN. Means PiVPN is offering both if all conditions (wg kernel module) are met.

1 Like

Interesting. I must have missed this then, and subsequently it was not offered because it has already installed OpenVPN, and assumed I want it. I’ll remove everything and retry.