GHOSTWIRE
ゴーストワイヤー

Your WireGuard server, in one binary

GHOSTWIRE is a self-hosted WireGuard VPN server manager. It sets up the server, manages peers and hands out configs as a QR code or download. It keeps traffic and connection history per peer, and has a JSON API and an iPhone app. Nothing else to install: the binary installs, updates and removes itself.

Install on a Linux server Run as a user with sudo, or as root
Short linkghostwi.re
$ curl -fsSL https://ghostwi.re/install | sh
GitHubgithub.com
$ curl -fsSL https://raw.githubusercontent.com/danielredetzke/GHOSTWIRE/main/install.sh | sh

Both fetch the same script; the short link leads to the one on GitHub. It downloads the latest release for the server's architecture, checks it against SHA256SUMS, asks a few questions and changes nothing until you confirm.

Latest v0.9.1 Linux · amd64 · arm64 · armv7 MIT license
The GHOSTWIRE dashboard: you are protected, four of six peers online, traffic of the last 24 hours as a bar chart, the peer list and recent activity
Coming from pivpn?

The same install command takes over a pivpn WireGuard server: its key, networks and every client with its keys and addresses. Phones and laptops keep their configs and reconnect on their own. If the switch fails, pivpn comes back as it was.

Moving from pivpn ↗
Features

Everything for a WireGuard server, nothing around it

One Go binary with the web interface built in. It talks to the kernel directly, so the server needs no wg-quick, no wireguard-tools and no /etc/wireguard.

Peers

Add, change, disable and remove devices. Hand out a config as a download or QR code, or send a one-time setup link protected by a PIN.

Live view

The speed of every peer right now, updated every 2 seconds, with the last 2 minutes as a chart.

Traffic history

Download and upload per peer, hourly for 48 hours and daily for 400 days.

Connection history

Every session with start, duration, address and traffic. Country and network come from DB-IP Lite, looked up on the server, so addresses never leave it.

Changes without drops

Only peers that changed are touched, the same effect as wg syncconf. Everyone else stays connected.

One file of state

Everything lives in config.json, and the kernel is kept in line with it: netlink for wg0, nftables in its own inet GHOSTWIRE table.

IPv4 and IPv6

IPv6 inside the tunnel turns on by itself when the server has a global IPv6 address.

HTTPS built in

Let's Encrypt, a self-signed certificate, your own certificate files, or plain HTTP behind a reverse proxy.

Updates

A daily check against GitHub shows new releases with their notes. An update backs up the config and goes back to the old binary if the new one doesn't stay up.

Install

A few questions, then a summary

Install asks for a domain, the WireGuard port and an admin password. With a domain it gets a Let's Encrypt certificate; without one it uses a self-signed certificate and the server's public IP. For scripts, every question has a flag.

Web interface
  Domain name for the web interface (empty: no domain, self-signed certificate)
  > vpn.example.net
  Email for Let's Encrypt expiry warnings (optional)
  > [email protected]

WireGuard
  Address devices connect to [vpn.example.net]
  >
  UDP port [51820]
  >

Admin account
  Password for "admin" (at least 12 characters): ************
  Repeat password: ************

Summary
  Web interface   https://vpn.example.net/ (Let's Encrypt, [email protected])
  Endpoint        vpn.example.net:51820/udp
  Tunnel network  10.214.86.0/24 (random free range) · IPv6 on
  Firewall        443/tcp, 80/tcp, 51820/udp must be reachable

Install with these settings? [Y/n]

Requirements

System
Linux, kernel 5.6 or newer, with nftables and systemd
Hardware
amd64, arm64 or 32-bit ARM, including Raspberry Pi
Ports
51820/udp WireGuard, 443/tcp web, 80/tcp optional for Let's Encrypt

iPhone app

Manage peers and the server and see stats and logs on iOS 18.6 or newer. Pair it under Settings → Pair iOS app. Available in the Apple App Store as GHOSTWIRE - Companion App.

Security

Small surface, nothing kept that isn't needed

The service runs unprivileged, signs in with modern factors and never stores a client's private key.

Client private keysNever storedA config is shown once. Issuing a new one makes new keys.
ServiceRuns as ghostwire, not rootOnly CAP_NET_ADMIN and CAP_NET_BIND_SERVICE; writes only to /opt/ghostwire.
Passwordsargon2id5 failed attempts lock an address for 15 minutes.
Two-step sign-inPasskeys and authenticator appsTouch ID, Face ID, Windows Hello, YubiKey; can be required for everyone.
Setup linksOne-time, with a PINKeys are made when the link is opened. 5 wrong PINs revoke it.
API tokensStored as hashesRead-only or full access, never for users or passwords.
Server keyReadable only by the serviceconfig.json is 0600.