The Simplest VPN installer, designed for Raspberry Pi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Xavier L 55ed0cb3a5
feat(install): add support for wireguard in containers
1 week ago
.github build: Add automated release actions 2 months ago
auto_install feat(install): add support for wireguard in containers 1 week ago
ciscripts ci(scripts): Fix malformated shebang 1 year ago
examples add option to force IPv6 config, forced IPv6 route by default, add IPv6 options for cli and unattended file 2 years ago
files/etc Added Alpine Linux support (#1567) 2 years ago
scripts fix(scripts): prevent adding wireguard 'usernames' longer than 15 characters, fixes issue #1816 2 months ago
.gitignore add gitignore, add unbound config for recursive verifying resolver (increased privacy). 5 years ago
.releaserc feat(ossupport): Jammy Support & CI Updates 2 years ago
.travis.yml ci: Use xargs instead of find -exec 1 year ago docs: README 2 years ago Fix email on code of conduct 8 years ago
LICENSE Update LICENSE 4 years ago Update maintenance notice 2 months ago
logos.jpg [ImgBot] Optimize images 3 years ago
logos.png [ImgBot] Optimize images 3 years ago
pivpnbanner.png [ImgBot] Optimize images 3 years ago

[!WARNING] PiVPN is maintained on a best-effort basis, please read more about it here. Previous announcement is here.

Pivpn Banner



Website Maintenance Codacy Badge Build Status Build Status made-with-bash Generic badge semantic-release: angular

PiVPN is a set of shell scripts developed to easily turn your Raspberry Pi (TM) into a VPN server using two free, open-source protocols:

This script's primary mission in life is to allow a user to have as cost-effective as possible VPN at home without being a technical wizard, hence the design of PiVPN to work on a Raspberry Pi ($35) with a one-command installer followed by easy management of the VPN with the 'pivpn' command.

That being said...

PiVPN should be, bar none, the simplest and fastest way to Install and set up an extremely secure OpenVPN or WireGuard server on your Raspberry Pi. You won't need a guide or tutorial as PiVPN will do it all for you in a fraction of the time with hardened security settings in place by default.

We recommend running PiVPN on the latest RaspberryPi OS Lite image in a Raspberry Pi at your home so you can VPN into your network from not secure remote locations and safely use the internet. However, you can also use PiVPN in any Cloud Provider VPS running Ubuntu or Debian to assist those with untrustworthy ISPs. Running a VPN on a server elsewhere means you can connect to the VPN from home, and because your traffic will be getting out from the cloud/VPS provider, your ISP will only see encrypted traffic.

PiVPN should also work with most Ubuntu and Debian based distributions, including those using UFW by default instead of raw iptables.


Method 1 (standard)

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

To install from custom git url and branch (for DEV)

This is inteded to be used when testing changes during development and not for standard installations. Without this the script will always checkout the master branch.

  • Git repo can be pivpn or any other git repo (e.g. a fork).
  • Git branch can be specified as required
# Syntax
git clone < customgitrepourl >
bash pivpn/auto_install/ --giturl < customgitrepourl > --gitbranch < customgitbranch >

# Example
git clone
bash pivpn/auto_install/ --giturl --gitbranch myfeaturebranch

The unattended setup config also supports a custom giturl and branch.


Feedback & Support

PiVPN is purely community-driven and its our objective for PiVPN to work for as many people as possible. We welcome any feedback on your experience. Please be respectful and be aware PiVPN is maintained with volunteers free time!

General Guidelines

  • This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to any project maintainer.
  • You can find our documentation at
  • Please read the pinned posts on Github Discussions
  • Please search for similar issues, you can search and apply filters that better match the problems you are facing.
  • Plase search for similar Discussions
  • If you have not found the answer feel free to open an issue and we will do our best to help out
    • Please help us helping you and fill the template adequately providing the requested data Even if it doesn't feel relevant to you
  • PiVPN team may close any Discussion/Issue without any warning if they don't follow the Guidelines


Our prefered contact method is through Github Discussions page

But the you can also reach out at:

Feature requests

Feature requests are very welcome, please do so at:

Bug reports

  • Make sure the bug is not already reported by searching on GitHub under Issues.
  • If you could not find an open issue addressing the problem, open a new one.
    • Please provide all the data requested on the template Even if it doesn't feel relevant to you and, if possible, a code sample or an executable test case demonstrating the expected behavior that is not occurring.

Pull Requests

  • Open a new GitHub pull request towards the test branch.
  • Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
  • Use the following commit rules.
  • Use the following code style rules.
    • We suggest you to use the following shfmt command: shfmt -i 2 -ci -sr -w -bn


PiVPN is not taking donations but if you want to show your appreciation, then contribute or leave feedback on suggestions or improvements.

Contributions can come in all kinds of different ways! You don't need to be a developer to help out.

  • Please check the current issues and discussions. Maybe there is something you can help with
  • Documentation! Documentation is never good enough! There is always something missing, or typos, or better English!
  • Our website is also Open Source. feel free to suggest any changes or improvements here
  • Testing!!! Run pivpn in different ways, different systems, different configurations! Let us know if you find something!
  • Assisting other users in any of our official channels is also very welcomed

Still, if you consider PiVPN useful and want to Donate instead, then consider donating to:

  1. PiVPN Contributors
  2. OpenVPNSetup
  4. OpenVPN
  5. WireGuard
  6. EFF