https://github.com/amayer1983/docksentry
Docker container update manager with Telegram bot, Discord, Web UI, auto-rollback, and 16 languages
https://github.com/amayer1983/docksentry
auto-update container discord docker docker-compose notifications rollback selfhosted telegram update web-ui webhook
Last synced: about 2 months ago
JSON representation
Docker container update manager with Telegram bot, Discord, Web UI, auto-rollback, and 16 languages
- Host: GitHub
- URL: https://github.com/amayer1983/docksentry
- Owner: amayer1983
- License: mit
- Created: 2026-04-04T08:57:11.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-19T20:15:32.000Z (about 2 months ago)
- Last Synced: 2026-04-19T21:19:38.402Z (about 2 months ago)
- Topics: auto-update, container, discord, docker, docker-compose, notifications, rollback, selfhosted, telegram, update, web-ui, webhook
- Language: Python
- Size: 2.62 MB
- Stars: 26
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Docksentry
Your Docker container watchdog — monitors images for updates and lets you manage them via Telegram, Discord, Web UI, and Webhooks, with auto-rollback and 16 languages.
## Features
- **Automatic update detection** — compares image digests on a configurable cron schedule
- **Telegram bot** — full interactive control with inline buttons and 14 commands
- **Discord notifications** — rich embeds for updates, successes, and failures
- **Generic webhooks** — JSON POST to Ntfy, Gotify, Home Assistant, or any HTTP endpoint
- **Optional Web UI** — dashboard with status, logs, history, settings, pin/unpin, auto-update toggles
- **Per-container auto-update** — selected containers update without confirmation
- **Pin/Freeze containers** — exclude containers from updates
- **Auto-rollback** — failed updates automatically restore the previous container
- **Docker Compose support** — native `docker compose pull/up` for Compose stacks
- **Self-update** — the bot can update itself automatically
- **Persistent settings** — Web UI changes survive restarts
- **Multi-language** — 16 languages, switchable at runtime
- **Lightweight** — Python standard library only, zero external dependencies
## Quick Start
### 1. Create a Telegram Bot
Message [@BotFather](https://t.me/BotFather) → `/newbot` → copy the token.
### 2. Get your Chat ID
Send a message to your bot, then open `https://api.telegram.org/bot/getUpdates` and find your `chat.id`.
### 3. Run
```bash
docker run -d \
--name docksentry \
--restart unless-stopped \
-e BOT_TOKEN=your-bot-token \
-e CHAT_ID=your-chat-id \
-v /var/run/docker.sock:/var/run/docker.sock \
amayer1983/docksentry:latest
```
### Docker Compose
```yaml
services:
docksentry:
image: amayer1983/docksentry:latest
container_name: docksentry
restart: unless-stopped
environment:
- BOT_TOKEN=your-bot-token
- CHAT_ID=your-chat-id
- CRON_SCHEDULE=0 18 * * *
- TZ=Europe/Berlin
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- docksentry_data:/data
security_opt:
- no-new-privileges:true
volumes:
docksentry_data:
```
## Commands
| Command | Description |
|---------|-------------|
| `/status` | Container overview with health, uptime, images |
| `/check` | Manually trigger an update check |
| `/updates` | Show pending updates |
| `/logs ` | Show last 30 log lines of a container |
| `/pin ` | Pin container — excluded from updates |
| `/unpin ` | Unpin container |
| `/autoupdate ` | Toggle auto-update per container |
| `/history` | Show update history |
| `/cleanup` | Remove old unused images |
| `/selfupdate` | Update the bot itself |
| `/debug` | Toggle debug mode |
| `/lang ` | Switch language |
| `/settings` | Show current configuration |
| `/help` | Show all commands |
> Partial name matching: `/pin ngi` matches `nginx`.
## Configuration
| Variable | Default | Description |
|----------|---------|-------------|
| `BOT_TOKEN` | *required* | Telegram Bot API token |
| `CHAT_ID` | *required* | Your Telegram chat ID |
| `CRON_SCHEDULE` | `0 18 * * *` | Cron expression for scheduled checks |
| `EXCLUDE_CONTAINERS` | | Comma-separated names to exclude |
| `AUTO_SELFUPDATE` | `false` | Auto-update the bot on each check |
| `LANGUAGE` | `en` | Bot language ([16 available](docs/languages.md)) |
| `WEB_UI` | `false` | Enable web dashboard |
| `WEB_PORT` | `8080` | Web UI port |
| `WEB_PASSWORD` | | Web UI password (Basic Auth) |
| `TELEGRAM_TOPIC_ID` | | Telegram topic/thread ID (for groups with topics) |
| `DISCORD_WEBHOOK` | | Discord webhook URL |
| `WEBHOOK_URL` | | Generic webhook URL (JSON POST) |
| `TZ` | `Europe/Berlin` | Timezone |
| `DOCKER_HOST` | | Docker API endpoint (for [socket proxy](docs/security.md)) |
| `DOCKER_API_VERSION` | | Force Docker API version (e.g. `1.43` for Synology/older Docker) |
| `DOCKSENTRY_IPV6` | `false` | Enable IPv6 outbound connections (default: IPv4-only to avoid `Network unreachable` in containers without IPv6 routing) |
All settings except BOT_TOKEN and CHAT_ID can also be changed via the Web UI and persist across restarts.
> **Synology / NAS users:** If Docksentry shows 0 containers, add `DOCKER_API_VERSION=1.43` to your environment variables.
## Web UI
Enable with `WEB_UI=true`. Provides status dashboard, container logs, update history, and full settings management — all in a dark-themed, mobile-responsive interface.
See [Web UI Documentation](docs/web-ui.md) for details.
## Notification Channels
| Channel | Updates | Results | Interactive |
|---------|:-:|:-:|:-:|
| **Telegram** | buttons | detailed | full control |
| **Discord** | rich embeds | rich embeds | via Web UI |
| **Webhook** | JSON | JSON | via Web UI |
See [Notification Setup](docs/notifications.md) for Discord and Webhook configuration.
## Documentation
| Topic | Link |
|-------|------|
| Update Workflow & Rollback | [docs/updates.md](docs/updates.md) |
| Web UI | [docs/web-ui.md](docs/web-ui.md) |
| Notification Channels | [docs/notifications.md](docs/notifications.md) |
| Docker Compose Support | [docs/compose.md](docs/compose.md) |
| Security & Socket Proxy | [docs/security.md](docs/security.md) |
| Multi-Language | [docs/languages.md](docs/languages.md) |
## Contributing
- **Feature ideas?** Open an [Issue](https://github.com/amayer1983/docksentry/issues) with the label `enhancement`
- **Found a bug?** Open an [Issue](https://github.com/amayer1983/docksentry/issues) with steps to reproduce
- **Translations?** Submit a PR for `app/lang/*.json`
- **Vote on the roadmap:** [Community Roadmap (Issue #2)](https://github.com/amayer1983/docksentry/issues/2)
## License
MIT License - see [LICENSE](LICENSE)