English | 中文
PeerHarbor is a lightweight, self-hosted WireGuard web admin panel. Give an AI assistant one sentence with your server address, let it prepare the install commands, then manage WireGuard devices from a browser.
- AI one-sentence setup: ask AI to configure PeerHarbor for your server.
- AI-assisted one-command install with
deploy/bootstrap.sh. - Open source under the MIT License.
- Lightweight Python/Flask web admin console.
- WireGuard protocol underneath, compatible with standard WireGuard clients.
- Add devices, scan QR codes, download
.conffiles, pause peers, grant admin access, and control trusted ports from the web UI.
Hands-on mode:
Please install and configure PeerHarbor for me. My server IP/domain is: ____.
After installation, give me the WireGuard QR code, the web admin URL, and the verification steps.
Command-only mode:
Please generate the commands to install PeerHarbor on my server. My server IP/domain is: ____.
Do not connect to my server. Only output the commands I need to run, remind me to allow udp/51820, and include how to open the web admin console.
sudo apt update
sudo apt install -y git
sudo git clone https://github.com/equationofmathphysics/peerharbor.git /opt/longtail
cd /opt/longtail/longtail
sudo ./deploy/bootstrap.sh YOUR_SERVER_IP_OR_DOMAIN:51820 phonebootstrap.sh installs dependencies, creates /etc/longtail/longtail.env,
creates or reuses /etc/wireguard/wg0.conf, starts wg-quick@wg0 and
longtail-web, and prints the first WireGuard QR code.
Allow the public WireGuard port in your cloud firewall or security group:
udp/51820
After scanning the QR code and turning on WireGuard, open:
http://10.66.0.1:51437/
From a computer outside the VPN, use an SSH tunnel:
ssh -L 51437:10.66.0.1:51437 user@your-server
Then open:
http://127.0.0.1:51437/
sudo systemctl status wg-quick@wg0 --no-pager sudo systemctl status longtail-web --no-pager
Main config file:
/etc/longtail/longtail.env
Common settings:
NET_TOOLS_SERVER_ENDPOINT=YOUR_SERVER_IP_OR_DOMAIN:51820 NET_TOOLS_WG_CONF=/etc/wireguard/wg0.conf NET_TOOLS_WG_CIDR=10.66.0.0/24 NET_TOOLS_SERVER_VPN_IP=10.66.0.1 NET_TOOLS_CLIENT_ALLOWED_IPS=10.66.0.0/24 NET_TOOLS_ADMIN_IPS=127.0.0.1,::1,10.66.0.1 NET_TOOLS_BIND_HOST=10.66.0.1 NET_TOOLS_FIREWALL_ENABLED=1
Full examples are in deploy/longtail.env.example and deploy/examples/.
- Do not commit generated client configs, QR-code images, or
/var/lib/longtail; they may contain private keys. - Do not expose the web admin console directly to the public internet.
- Only
udp/51820needs to be public by default. - Keep admin access limited to localhost and trusted WireGuard devices.
Project-authored code is released under the MIT License.
