Skip to content


Method 1

curl -L | bash
curl | bash

Method 3 (clone repo)

git clone
bash pivpn/auto_install/

To install from Test/Development branch

curl -L | TESTING= bash

Non-interactive installation

You can run the PiVPN installer from within scripts using the --unattended command line option provided with a .conf file. You can find examples here.

curl -L >
chmod +x
./ --unattended options.conf

It's not required to specify all options. If some of them are missing, they will be filled with defaults or generated at runtime if it can be done unambiguously. For example if you have just one network interface, such interface will be used but if you have more, the script will stop.

If not specified, IPv4addr and IPv4gw default to the current network settings, pivpnHOST to the public IP, pivpnSEARCHDOMAIN to empty. Rest of the default options are in the examples.

The options provided must make sense in relation to each other, for example you can't use TWO_POINT_FOUR=1 with pivpnENCRYPT=2048.

Updating pivpn

To update PiVPN management scripts simply run pivpn update


This will not update The VPN Protocol, Read Updating OpenVPN or Updating Wireguard for information on how to update the VPN protocol.


If at any point you wish to remove PiVPN from your Pi and revert it to a pre-installation state, such as if you want to undo a failed installation to try again or you want to remove PiVPN without installing a fresh Raspbian image, just run pivpn uninstall.