Scripts2026年5月27日·1 分钟阅读

PiVPN — Simplest VPN Installer for Raspberry Pi and Debian

PiVPN is a one-command installer that sets up WireGuard or OpenVPN on a Raspberry Pi or any Debian-based system. It automates server configuration, client profile generation, and firewall rules for a hassle-free self-hosted VPN.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
PiVPN Overview
先审查命令
npx -y tokrepo@latest install a93150a1-5983-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

PiVPN turns a Raspberry Pi or any Debian/Ubuntu server into a fully functional VPN endpoint in minutes. It wraps the complexity of WireGuard or OpenVPN configuration into a guided installer and simple management commands.

What PiVPN Does

  • Installs and configures WireGuard or OpenVPN with secure defaults via an interactive script
  • Generates client configuration files and QR codes for easy mobile onboarding
  • Manages users with simple commands: add, revoke, list, and debug
  • Configures iptables and port forwarding automatically
  • Supports unattended installation via a pre-configured setup file

Architecture Overview

PiVPN is a collection of bash scripts. The installer detects the OS, sets up the chosen VPN protocol, generates server keys, configures the firewall, and enables the service. Client management scripts generate key pairs and config files stored in a local directory. The underlying VPN software (WireGuard kernel module or OpenVPN daemon) handles all traffic tunneling.

Self-Hosting & Configuration

  • Runs on Raspberry Pi OS, Debian, and Ubuntu on ARM or x86 hardware
  • Interactive installer asks for protocol choice, port, DNS provider, and user settings
  • Unattended mode reads answers from a setupVars.conf file for automated deployments
  • Configuration files live in /etc/wireguard/ or /etc/openvpn/ depending on protocol
  • Port forwarding on your router is required to allow external connections

Key Features

  • One-command install with sensible security defaults out of the box
  • QR code generation for importing WireGuard profiles on iOS and Android
  • Protocol choice: WireGuard for performance or OpenVPN for compatibility
  • Built-in pivpn debug command for troubleshooting connection issues
  • Automatic unattended-upgrades configuration to keep the server patched

Comparison with Similar Tools

  • Algo — cloud-focused VPN deployer using Ansible; PiVPN targets local hardware with a simpler interactive installer
  • WireGuard directly — PiVPN automates what you would configure by hand and adds user management
  • Tailscale — mesh VPN with NAT traversal; PiVPN is a traditional hub-and-spoke self-hosted solution
  • Outline VPN — GUI-first Shadowsocks-based VPN; PiVPN uses standard WireGuard or OpenVPN protocols
  • Streisand — archived multi-protocol VPN deployer; PiVPN is actively maintained with a narrower focus

FAQ

Q: Does PiVPN work only on Raspberry Pi? A: No. Despite the name, it works on any Debian or Ubuntu system including cloud VMs and x86 servers.

Q: Should I choose WireGuard or OpenVPN? A: WireGuard is faster and simpler. Choose OpenVPN only if you need compatibility with older clients or corporate environments that block UDP.

Q: Can I run PiVPN alongside Pi-hole? A: Yes. This is a popular combination: PiVPN tunnels your traffic home, and Pi-hole filters ads and trackers for VPN-connected devices.

Q: How many clients can a Raspberry Pi handle? A: A Raspberry Pi 4 with WireGuard can comfortably handle 20-30 concurrent clients for typical home use.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产