3.7 KiB
🐳 Discord Docker Monitor Bot
Monitor your Docker containers directly from Discord — automatic status updates every 30 seconds, grouped by project, with read-only channels for your team.
📸 [Screenshot or GIF here]
✨ Features
- 📋 List all Docker containers on your host
- 📁 Group containers with dedicated Discord channels
- 🔄 Automatic status updates every 30 seconds
- 🟢 Live status indicators (running, exited, paused, created)
- 🔒 Read-only channels for regular users
🚀 Quick Start
Option A — Docker Run (fastest)
docker run -d \
--restart unless-stopped \
-e BOT_TOKEN=your_token \
-e DOCKER_HOST=tcp://your-host:2375 \
-e GUILD_ID=your_guild_id \
-e CATEGORY_NAME="Docker Status" \
survivalful/discord-docker-bot:latest
Option B — Docker Compose (recommended)
- Create your
.envfile:
BOT_TOKEN=your_discord_bot_token
DOCKER_HOST=tcp://your-docker-host:2375
GUILD_ID=your_discord_server_id
CATEGORY_NAME=Docker Status
- Create your
docker-compose.yml:
services:
discord-bot:
image: survivalful/discord-docker-bot:latest
restart: unless-stopped
env_file:
- .env
- Start it:
docker compose up -d
That's it! 🎉
🤖 Commands
| Command | Description |
|---|---|
!info |
Shows all available commands |
!container_list |
Lists all containers on the host |
!group_create <name> <container1> ... |
Creates a group with a dedicated channel |
!group_remove <name> |
Deletes a group and its channel |
!group_list |
Shows all existing groups |
📊 Status Indicators
| Symbol | Status |
|---|---|
| 🟢 | Running |
| 🔴 | Exited |
| 🟡 | Paused |
| ⚪ | Created |
| ❓ | Unknown |
⚙️ Requirements
- Docker & Docker Compose on the host
- Docker remote API enabled (
tcp://host:2375) - A Discord Bot Token (create one here)
⚠️ Security Warning
Port 2375 is unencrypted and unauthenticated. Anyone with network access to that port can control your Docker daemon.
Recommendations:
- Use a firewall to restrict access to port 2375
- Only expose it on a trusted local network
- Consider using Docker socket proxy as a safer alternative
- Never expose port 2375 to the public internet
🛠️ Troubleshooting
Bot starts but no channels are created
→ Check that GUILD_ID is correct and the bot has Manage Channels permission.
"Cannot connect to Docker"
→ Make sure the Docker remote API is enabled and DOCKER_HOST points to the right address.
Status stops updating
→ Restart the container: docker compose restart
Bot is offline in Discord
→ Check your BOT_TOKEN and verify the bot is still in your server.
🤝 Contributing
Contributions are welcome! Open an issue or submit a pull request on the Git repository.
📄 License
Licensed under GNU GPL v3.0 — free to use, modify and distribute, but changes must stay open-source.