Monitor your Docker containers directly from Discord ā automatic status updates every 30 seconds, crash alerts, uptime tracking, and full container control via slash commands.

:8080/healthOption 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" \
-p 8080:8080 \
survivalful/discord-docker-bot:latest
Option B ā Docker Compose (recommended)
.env file:BOT_TOKEN=your_discord_bot_token
DOCKER_HOST=tcp://your-docker-host:2375
GUILD_ID=your_discord_server_id
CATEGORY_NAME=Docker Status
docker-compose.yml:services:
discord-bot:
image: survivalful/discord-docker-bot:latest
restart: unless-stopped
env_file:
- .env
ports:
- "8080:8080"
docker compose up -d
That's it! š
After the bot starts, run /setup in Discord to configure your alert preferences.
All commands are slash commands (/).
| Command | Description |
|---|---|
/info | Shows all available commands |
/setup | Configure crash alert mode and alert channel |
/container_list | Lists all containers with status and uptime |
/container_start <name> | Starts a container |
/container_stop <name> | Stops a container |
/container_logs <name> | Shows the last 20 log lines of a container |
/group_create <name> <containers> | Creates a group with a dedicated channel |
/group_remove <name> | Deletes a group and its channel |
/group_list | Shows all existing groups |
Note: Container and group names support autocomplete.
Configure alert behaviour with /setup:
| Alert Mode | Behaviour |
|---|---|
In each group channel | Crash alerts are posted in the group channel the container belongs to |
In a separate alert channel | All crash alerts go to a single dedicated channel |
A crash is detected when a container transitions from running ā exited during the 30-second monitoring cycle.
| Symbol | Status |
|---|---|
| š¢ | Running |
| š“ | Exited |
| š” | Paused |
| āŖ | Created |
| ā | Unknown |
Running containers also display their uptime (e.g. 2d 4h 15m).
| Environment Variable | Required | Default | Description |
|---|---|---|---|
BOT_TOKEN | ā | ā | Your Discord bot token |
DOCKER_HOST | ā | ā | Docker remote API URL (e.g. tcp://host:2375) |
GUILD_ID | ā | ā | Your Discord server ID |
CATEGORY_NAME | ā | Docker Status | Category name for group channels |
Alert settings (mode and channel) are saved persistently in settings.json via /setup.
The bot exposes a health check endpoint at:
GET http://<host>:8080/health
Returns 200 OK when the bot is running. Useful for container orchestration or uptime monitoring tools like Uptime Kuma.
Port 2375 is unencrypted and unauthenticated. Anyone with network access to that port can control your Docker daemon.
Recommendations:
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.
Slash commands don't appear
ā Make sure the bot has the applications.commands scope. Commands are synced to the guild on startup.
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.
No crash alerts received
ā Run /setup to configure an alert mode ā without setup, alerts may fall back to the first available group channel.
Contributions are welcome! Open an issue or submit a pull request on the Git repositoryā .
Licensed under GNU GPL v3.0ā ā free to use, modify and distribute, but changes must stay open-source.
Content type
Image
Digest
sha256:19667962fā¦
Size
51.3 MB
Last updated
5 months ago
docker pull survivalful/discord-docker-bot