Files
wireguard-ui-multi/systemd/wireguard-ui-multi.service
sysopsandClaude Sonnet 5 e5c0a5888f Adapt installers to upstream wireguard-ui build (Go+embed, yarn assets)
Upstream builds a single static binary (main.go at repo root, no
cmd/... subpackage) that go:embeds templates/ and assets/ at compile
time, and uses a relative ./db directory (jsondb) instead of SQLite -
so WorkingDirectory in the systemd unit now matters for the DB path,
not for template/static serving like before.

Frontend assets (admin-lte, jquery plugins) need yarn + prepare_assets.sh
before go build, so all installers now also install nodejs/npm/yarn and
run prepare_assets.sh when assets/dist is missing or package.json changed.

Binary is now literally named "wireguard-ui" (matches upstream), listens
on 0.0.0.0:5000 by default. systemd unit rewritten accordingly with
WorkingDirectory=/var/lib/wireguard-ui-multi.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 18:38:02 +02:00

22 lines
591 B
Desktop File

[Unit]
Description=wireguard-ui - WireGuard management UI
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# Runs as root because it shells out to wg-quick / wg, which need
# CAP_NET_ADMIN in practice (and wg-quick itself needs broad privileges).
User=root
Group=root
AmbientCapabilities=CAP_NET_ADMIN
# wireguard-ui reads/writes ./db relative to the working directory.
WorkingDirectory=/var/lib/wireguard-ui-multi
Environment=BIND_ADDRESS=0.0.0.0:5000
ExecStart=/usr/local/bin/wireguard-ui
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target