Show HN: Wg-admin – 用于现有 WireGuard 主机的 Web UI
Show HN: Wg-admin – web UI for an existing WireGuard host

原始链接: https://github.com/logimaxx/wg-admin

**wg-admin** 是一个非侵入式的 Web 界面,旨在管理现有的 WireGuard 安装,而无需接管你的配置或替换 `wg-quick`。与其他强制要求采用特定结构的后台管理面板不同,wg-admin 运行在现有设置之上,保留了你的 `[Interface]` 设置、路由钩子和自定义 NAT 规则。 **主要特性:** * **非侵入式:** 使用 `wg syncconf` 应用更改,防止接口中断。 * **原地管理:** 自动检测并管理 `/etc/wireguard` 中的所有 `*.conf` 文件。 * **安全默认设置:** 在进行任何更改前自动存储备份,并默认在本地(127.0.0.1)运行以确保安全。 * **完整的对等节点生命周期:** 可轻松添加、重命名、轮换密钥及删除对等节点。 * **配置工具:** 为新节点或轮换后的节点生成可下载的客户端 `.conf` 文件和二维码。 * **实时监控:** 直接通过 UI 提供握手状态、传输数据和端点信息的实时可视化。 wg-admin 专为可靠性而设计,尊重你已有的手动配置,并为基于 Linux 的 WireGuard 主机提供了一个受密码保护且高效的日常对等节点管理面板。

抱歉。
相关文章

原文

A focused web UI for a WireGuard host that is already running. It reads the files already in /etc/wireguard, lets you add and edit peers, and applies changes with wg syncconf so the interface does not bounce.

wg-admin does not install WireGuard, replace wg-quick, or rewrite your PostUp / NAT lines. It sits on top of the configuration you already have.

Peer list for wg0 with live handshake and transfer

More screenshots

Most WireGuard admin panels want to own the tunnel: they generate a new config, take over wg-quick, and leave you to re-learn their layout. This one does the opposite.

Install it on a host that already has a working VPN. Existing [Interface] keys, routing hooks, and peers stay as they are. You get a password-protected UI for day-to-day peer work — names, client files, QR codes, handshakes — without replacing the server setup you already trust.

  • Inherits live configs — every *.conf in /etc/wireguard is listed and managed in place
  • Non-disruptive apply — writes the file, then wg syncconf when the interface is up (no bounce)
  • Peer lifecycle — add, rename, edit, rotate keys, and remove peers
  • Client onboarding — downloadable .conf and QR code for peers created or rotated in the UI
  • Live status — last handshake, transfer, and endpoint from wg
  • Safe first write — a backup is stored under /var/lib/wg-admin/backups/ before the file is changed
  • Local by default — binds to 127.0.0.1; put Caddy or nginx with TLS in front if others need access
  • Linux with Python 3.11 or newer
  • wireguard-tools (wg) for live status and apply
  • Root, or equivalent access to /etc/wireguard and CAP_NET_ADMIN

On a host that already runs WireGuard:

git clone https://github.com/logimaxx/wg-admin.git
cd wg-admin
sudo ./install.sh

Then open http://127.0.0.1:8080 and set an admin password. Every *.conf already in /etc/wireguard is listed and managed in place.

To remove the service (WireGuard configs are left untouched):

Defaults live in /etc/wg-admin.env:

WG_ADMIN_HOST=127.0.0.1
WG_ADMIN_PORT=8080
WG_ADMIN_CONFIG_DIR=/etc/wireguard
WG_ADMIN_STATE_DIR=/var/lib/wg-admin

Keep the service on localhost. Put a reverse proxy with TLS in front if anyone else needs access.

From the server .conf Kept as-is
[Interface] keys (Address, ListenPort, PrivateKey, PostUp / PostDown, MTU, Table, DNS, …) Yes
Existing [Peer] public keys, AllowedIPs, PSK, keepalive, endpoint Yes
Comment above a peer (# Alice or # Name = Alice) Used as the display name

WireGuard never stores a client private key on the server. Peers that already existed can be edited and removed, but a downloadable .conf / QR code is only available for peers created (or rotated) in this UI.

Client-only settings (public endpoint, DNS, client AllowedIPs) are stored in /var/lib/wg-admin/state.json, not in the server config.

  • Open an interface to see peers, last handshake, and transfer.
  • Add peer generates keys, picks the next free IPv4 in the interface subnet, and writes the server file.
  • Download the client file or scan the QR code.
  • Save / apply uses wg syncconf when the interface is up. If it is down, only the file is updated.
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest
./scripts/run-demo.sh

Demo mode uses demo/wireguard and never calls wg.

wg-admin is developed and maintained by Sergiu Voicu, co-founder of LogiMaxx Systems — an IT services firm focused on monitoring, operational automation, and production software.

Issues and pull requests are welcome on GitHub.

MIT. See LICENSE.

Copyright © 2026 LogiMaxx Systems and Sergiu Voicu.

WireGuard is a registered trademark of Jason A. Donenfeld. This project is not affiliated with the WireGuard project.

联系我们 contact @ memedata.com