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>
22 lines
591 B
Desktop File
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
|