VPNSmith
self-host-vpnHOWTO

PiVPN in 2026: the easiest way to self-host WireGuard or OpenVPN

PiVPN is a one-command installer that sets up WireGuard or OpenVPN on a Raspberry Pi or any Debian/Ubuntu VPS. How it works, install and client setup, honest limits, and PiVPN vs Tailscale/Headscale/NetBird in 2026.

By Eric Gerard · Fondateur · VPNSmith — Spécialiste self-host VPN & VPS GDPR3 min readPhoto via Unsplash

Self-hosting a VPN used to mean hand-editing config files and hoping you got the keys, routing and firewall right. PiVPN removes almost all of that: it is a one-command installer that sets up WireGuard or OpenVPN on a Raspberry Pi or any Debian/Ubuntu VPS, then manages your client devices with a few simple commands. This guide covers how it works, the install, the honest limits, and where it fits versus the mesh VPNs.

What PiVPN is (and isn't)

PiVPN is a wrapper/installer, not a new protocol. It configures the real, well-audited VPN software for you:

  • Pick WireGuard (recommended in 2026) or OpenVPN during setup.
  • It handles keys, server config, routing and firewall rules with sane defaults.
  • Manage clients with pivpn add, pivpn -qr (QR code for phones), and pivpn -l to list profiles.

It gives you a classic single VPN server: every device connects back to that one machine. That simplicity is its strength.

A laptop on a wooden desk
A laptop on a wooden desk

Raspberry Pi or VPS?

  • Raspberry Pi at home → a tunnel back into your home network; depends on your home upload speed and a stable public IP / dynamic DNS. See our Raspberry Pi 5 self-host guide.
  • Cloud VPS → a fast, always-on private exit point with a fixed public IP, for a few euros a month — ideal for remote access while travelling. A Contabo VPS S at €4.99/month handles personal VPN traffic comfortably.

Installing PiVPN

On a fresh Debian/Ubuntu host:

# review the script before running it (open the URL in a browser first)
curl -L https://install.pivpn.io | bash

The guided installer asks for the protocol (choose WireGuard), the network interface, a static IP, the DNS provider, and the public endpoint (IP or domain). When it finishes, add your first client:

pivpn add            # create a client profile
pivpn -qr            # show a QR code to import on a phone

Always open and read an install script before piping it to bash. For base VPS hardening that applies here too, see the Contabo VPS setup guide, and for the protocol choice, WireGuard vs OpenVPN.

The honest limits

  • Single server, not a mesh. Every client routes through that one box. Great for a personal exit node; not built for meshing many devices and sites.
  • You own the maintenance. Patching, key rotation, firewall and uptime are yours — keep unattended security updates on.
  • Home-hosting caveats. On a Raspberry Pi, your upload speed caps throughput and you need a stable public IP or dynamic DNS.
  • It is a wrapper. Security comes from WireGuard/OpenVPN and your host hygiene, not from PiVPN itself.

PiVPN vs the mesh VPNs

PiVPNTailscale / Headscale / NetBird
ModelSingle VPN serverPeer-to-peer mesh
Best forPersonal exit node, remote accessMany devices/sites connected together
SetupOne installer, very simpleMore components (coordinator, etc.)
ProtocolWireGuard or OpenVPNWireGuard-based

If you need a mesh instead of a single server, see our NetBird self-host guide and the best self-hosted VPN 2026 overview.

The bottom line

PiVPN is the fastest, simplest way to stand up your own WireGuard or OpenVPN server in 2026 — on a Raspberry Pi for home access, or on a cheap VPS for an always-on private exit point. Choose it when you want one clean personal server; reach for a mesh VPN when you need many nodes connected. Either way, you own the server and the keys.

Spin up a Contabo VPS for PiVPN →

Editorial guide based on PiVPN's documented installer behaviour and the documented properties of WireGuard and OpenVPN. Security depends on the underlying protocols and your host hygiene, which we state plainly. Commercial links carry the rel="sponsored nofollow" attribute; an affiliate commission may apply at no extra cost to you.

★ Nuremberg GDPR datacenter · ✓ Dedicated IPv4 included · 200+ Mbps guaranteed

Self-host your VPN on your own VPS → ContaboFull root access · public IPv4 · pick your region