A self-hosted Discord bot for managing and monitoring your DiscoPanel Minecraft servers directly from Discord.
- 📊 Live Status Embeds — Auto-updating server status in a channel of your choice (online/offline, players, CPU, RAM, TPS, storage, uptime)
- 🎮 Server Control — Start, stop, and restart servers with slash commands
- ⚡ Quick Actions — Optional buttons on status embeds for instant server control
- 📌 Pin Servers — Choose which servers to monitor per Discord guild
- ⚙️ Configurable Fields — Toggle which info appears in status embeds
- 🔒 Admin Only — All commands restricted to admins or a configurable role
- 🏠 Flexible Deployment — Single-guild mode (simple) or multi-guild mode (one bot for multiple Discord servers)
- A running DiscoPanel instance
- A Discord bot token (create one here)
- Docker (recommended) or Node.js 20+
The bot supports two deployment modes:
| Mode | Use Case | Panel Setup |
|---|---|---|
| Single-Guild (default) | One Discord server, one DiscoPanel | Configure panel in environment variables |
| Multi-Guild | Multiple Discord servers, each with their own DiscoPanel | Users run /setup to connect their panel |
- Go to the Discord Developer Portal
- Click New Application, give it a name
- Go to Bot → click Reset Token → copy the token
- Go to OAuth2 → URL Generator → select scopes:
bot,applications.commands - Select permissions:
Send Messages,Embed Links,Read Message History,Use Slash Commands - Open the generated URL to invite the bot to your server
Best for personal use — panel credentials are configured via environment variables.
services:
discopanel-bot:
image: ghcr.io/muckmuck96/discopanel-bot:latest
container_name: discopanel-bot
restart: unless-stopped
environment:
- DISCORD_TOKEN=your_discord_bot_token
- DISCORD_CLIENT_ID=your_application_client_id
- PANEL_URL=http://your-panel:8080
- PANEL_USERNAME=your_panel_username
- PANEL_PASSWORD=your_panel_password
# Optional:
# - STATUS_INTERVAL=30
# - LOG_LEVEL=info
volumes:
- discopanel-bot-data:/app/data
volumes:
discopanel-bot-data:Best for public bots — each Discord server connects to their own panel via /setup.
First, generate an encryption key:
openssl rand -hex 32services:
discopanel-bot:
image: ghcr.io/muckmuck96/discopanel-bot:latest
container_name: discopanel-bot
restart: unless-stopped
environment:
- DISCORD_TOKEN=your_discord_bot_token
- DISCORD_CLIENT_ID=your_application_client_id
- MULTI_GUILD=true
- ENCRYPTION_KEY=your_64_char_hex_key
# Optional:
# - STATUS_INTERVAL=30
# - LOG_LEVEL=info
volumes:
- discopanel-bot-data:/app/data
volumes:
discopanel-bot-data:docker compose up -ddocker run -d \
--name discopanel-bot \
--restart unless-stopped \
-e DISCORD_TOKEN=your_discord_bot_token \
-e DISCORD_CLIENT_ID=your_application_client_id \
-e PANEL_URL=http://your-panel:8080 \
-e PANEL_USERNAME=your_panel_username \
-e PANEL_PASSWORD=your_panel_password \
-v discopanel-bot-data:/app/data \
ghcr.io/muckmuck96/discopanel-bot:latestdocker run -d \
--name discopanel-bot \
--restart unless-stopped \
-e DISCORD_TOKEN=your_discord_bot_token \
-e DISCORD_CLIENT_ID=your_application_client_id \
-e MULTI_GUILD=true \
-e ENCRYPTION_KEY=your_64_char_hex_key \
-v discopanel-bot-data:/app/data \
ghcr.io/muckmuck96/discopanel-bot:latestgit clone https://github.com/muckmuck96/discopanel-bot.git
cd discopanel-bot
docker build -t discopanel-bot .
docker run -d \
--name discopanel-bot \
--restart unless-stopped \
-e DISCORD_TOKEN=your_discord_bot_token \
-e DISCORD_CLIENT_ID=your_application_client_id \
-e PANEL_URL=http://your-panel:8080 \
-e PANEL_USERNAME=your_panel_username \
-e PANEL_PASSWORD=your_panel_password \
-v discopanel-bot-data:/app/data \
discopanel-botOnce the bot is running and invited to your server:
/pin— Select which servers to monitor (panel connection is automatic)/status-channel— Pick a channel for live status embeds- Done! The bot will start posting and updating server status automatically.
/setup— Connect to your DiscoPanel instance (enter URL + credentials via a secure popup)/pin— Select which servers to monitor/status-channel— Pick a channel for live status embeds- Done! The bot will start posting and updating server status automatically.
| Command | Description | Permission |
|---|---|---|
/setup |
Connect to a DiscoPanel instance (multi-guild mode only) | Admin |
/pin |
Pin/unpin servers to monitor | Admin |
/status-channel |
Set the status embed channel | Admin |
/server start <server> |
Start a server | Admin |
/server stop <server> |
Stop a server | Admin |
/server restart <server> |
Restart a server | Admin |
/server list |
List all pinned servers | Admin |
/server info <server> |
Detailed server info | Admin |
/settings admin-role <role> |
Set which role can use commands | Manage Guild |
/settings status-config |
Toggle status embed fields | Admin |
/settings quick-actions <on/off> |
Enable/disable quick action buttons | Admin |
/settings disconnect |
Remove panel connection | Manage Guild |
The status embed can display the following information (configurable via /settings status-config):
| Field | Description |
|---|---|
| Online Status | Server state with colored indicator |
| Player Count | Current/max players online |
| Version | Minecraft version and mod loader |
| CPU Usage | Current CPU percentage |
| RAM Usage | Memory consumption |
| Uptime | Time since last server start |
| TPS | Server ticks per second (20 = optimal) |
| Storage | Disk usage |
Enable quick action buttons on status embeds with /settings quick-actions enabled:true.
The buttons shown depend on the current server state:
- Server Stopped → Start button
- Server Running → Stop and Restart buttons
- Starting/Stopping → No buttons (prevents spam)
Buttons are disabled immediately when clicked to prevent duplicate requests.
| Variable | Description |
|---|---|
DISCORD_TOKEN |
Discord bot token |
DISCORD_CLIENT_ID |
Discord application client ID |
| Variable | Required | Description |
|---|---|---|
PANEL_URL |
✅ | DiscoPanel URL (e.g., http://localhost:8080) |
PANEL_USERNAME |
✅ | DiscoPanel username |
PANEL_PASSWORD |
✅ | DiscoPanel password |
| Variable | Required | Description |
|---|---|---|
MULTI_GUILD |
✅ | Set to true to enable multi-guild mode |
ENCRYPTION_KEY |
✅ | 32-byte hex string for encrypting stored tokens |
| Variable | Default | Description |
|---|---|---|
STATUS_INTERVAL |
30 |
Status embed update interval in seconds |
LOG_LEVEL |
info |
Log level: debug, info, warn, error |
The bot stores its SQLite database in /app/data inside the container. Use a named volume to persist data across container restarts:
-v discopanel-bot-data:/app/datagit clone https://github.com/muckmuck96/discopanel-bot.git
cd discopanel-bot
npm install
npm run build
# Set environment variables (or create a .env file)
# Single-Guild Mode:
export DISCORD_TOKEN=...
export DISCORD_CLIENT_ID=...
export PANEL_URL=http://your-panel:8080
export PANEL_USERNAME=...
export PANEL_PASSWORD=...
# Or Multi-Guild Mode:
# export DISCORD_TOKEN=...
# export DISCORD_CLIENT_ID=...
# export MULTI_GUILD=true
# export ENCRYPTION_KEY=...
npm startContributions are welcome! Please open an issue or PR.
MIT