0.0.4 • Published 3 years ago
wg-dash v0.0.4
WireGuard Dashboard
- Binary: Releases
- Docker: Container Packages
Run WireGuard Dashboard
Default username and password are admin
.
Using docker compose
version: '3.3'
services:
wg:
image: ghcr.io/ss-o/wg-dash:main
container_name: wg-dash
ports:
- 5000:5000
logging:
driver: json-file
options:
max-size: 50m
volumes:
- ./db:/app/db
- /etc/wireguard:/etc/wireguard # Recommended mount point
restart: unless-stopped
Deploy: docker-compose up -d
Using binary file
Download the binary file from the release and run it with command:
./wg-dash
Setup Services
Dashboard only takes care of configurations. See examples below:
Systemd
sudo curl -L 'https://raw.githubusercontent.com/ss-o/wg-dash/main/systemd/wgui.service' -o '/etc/systemd/system/wgui.service'
sudo curl -L 'https://raw.githubusercontent.com/ss-o/wg-dash/main/systemd/wgui.path' -o '/etc/systemd/system/wgui.path'
sudo systemctl enable wgui.{path,service}
sudo systemctl start wgui.{path,service}
Openrc
Run below:
Check if successful and in path (which wgui)
sudo touch /usr/local/bin/wgui && \
sudo chmod +x /usr/local/bin/wgui
Put inside:
#!/bin/sh
wg-quick down wg0
wg-quick up wg0
Run:
sudo touch /etc/init.d/wgui && \
sudo chmod +x /etc/init.d/wgui
#!/sbin/openrc-run
command=/sbin/inotifyd
command_args="/usr/local/bin/wgui /etc/wireguard/wg0.conf:w"
pidfile=/run/${RC_SVCNAME}.pid
command_background=yes
Apply it
rc-service wgui start
rc-update add wgui default
Build
Build docker image
Go to the project root directory and run the following command:
docker build -t wg-dash .
Build binary file
Prepare the assets directory
# Get assets
./prepare_assets.sh
# Generate embed Go
rice embed-go
go build -o wg-dash
Or, append resources to executable as zip file
go build -o wg-dash
rice append --exec wg-dash
Screenshots
License
MIT. See LICENSE.