Repository navigation
Web Dashboard
Set WEB_ENABLED=true to get a web page at http://HOST:8080 (port: WEB_PORT). It shows:
- Bot status: Discord connection, latency, guilds, uptime and the auto stop interval
- Servers: status, players with their names, version, CPU and RAM of every server
- Feature flags: switch commands and auto stop on and off
- Logs: the most recent log entries, live
The status refreshes every 30 seconds, the logs every 5 seconds. With Docker, publish the port (-p 8080:8080).
Set WEB_PASSWORD to protect the dashboard with HTTP basic auth (the browser asks for a user name and password; the
user name doesn't matter). Without a password:
- anyone who can reach the port can see the status and the logs (Discord user names and IDs, server addresses)
- feature flags and the log level are read-only
- the dashboard only answers requests for an IP address,
localhostor a name inWEB_ALLOWED_HOSTS. This protects against DNS rebinding, where a website you visit tries to read the dashboard through your browser
Warning
Basic auth sends the password unencrypted. Put the dashboard behind a reverse proxy with HTTPS if it is reachable from the internet.
| Flag | Default | Effect |
|---|---|---|
auto_stop |
ENABLE_AUTO_STOP_SERVER |
Runs the Auto Stop checks |
command_list, command_stats, command_start, command_stop, command_restart, command_backup
|
on | Allows the command in Discord |
Changes take effect immediately and are saved to FLAGS_FILE (data/feature_flags.json), so they survive a restart.
With Docker, mount a volume at /usr/src/app/data to keep them when the container is recreated.
The bot keeps its last 1000 log entries in memory. You can filter them by level and search them. With WEB_PASSWORD
set you can also change the log level, for example to DEBUG while looking into a problem. The change lasts until the
bot restarts; then LOG_LEVEL applies again. For a permanent log use LOG_FILE.
| Path | Description |
|---|---|
/ |
The dashboard |
/api/status |
Bot and server status as JSON (cached for 15 seconds) |
/api/flags |
Feature flags as JSON |
/api/logs?after=<id> |
Log entries newer than <id>
|
/healthz |
Returns ok, without password, for health checks |
If the port is in use or WEB_HOST is wrong, the bot logs an error and keeps running without the dashboard.
Setup
Usage
Help