Lucas Berger 186f11362e chore(10-05): verify and document workflow refactoring
- Run cleanup and verification script
- No orphaned nodes found
- Workflow structure validated
- Final node count: 199 (reduced from 209, -4.8%)
- Add comprehensive deployment guide

Node composition:
- 79 code nodes
- 50 httpRequest nodes
- 27 telegram nodes
- 14 if nodes
- 10 switch nodes
- 9 executeCommand nodes
- 9 executeWorkflow nodes (sub-workflow calls)
- 1 telegramTrigger node

Note: Node count (199) is above target range (120-150) but achieves
primary goals of eliminating duplicate logic. Further optimization
possible (~40-45 nodes) by consolidating batch UI and confirmation flows.

Deployment requires importing n8n-container-logs.json and updating
the workflow ID in main workflow Execute Text/Inline Logs nodes.
2026-02-04 13:58:48 -05:00
2026-01-28 16:05:47 -05:00

Docker Manager Bot

Telegram bot for managing Docker containers on Unraid. Control containers from your phone with simple keyword commands.

Prerequisites

  • Unraid server with Docker enabled
  • n8n container running on Unraid
  • Telegram Bot Token (from @BotFather)
  • Your Telegram User ID (from @userinfobot)

Installation

1. Configure n8n Container

Your n8n container needs Docker socket access to manage other containers. Add these flags to your n8n container configuration:

docker run -d \
  --name n8n \
  --group-add 281 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /path/to/curl:/usr/bin/curl:ro \
  -p 5678:5678 \
  n8nio/n8n

Required flags:

  • --group-add 281 - Adds Docker group (GID 281 on Unraid) so n8n can access the Docker socket
  • -v /var/run/docker.sock:/var/run/docker.sock - Mounts the Docker socket for container management
  • -v /path/to/curl:/usr/bin/curl:ro - Mounts a static curl binary (hardened n8n image lacks package manager)

If using Unraid's Community Applications, add these to the "Extra Parameters" and "Path" sections of your n8n container template.

2. Create Telegram API Credential

In the n8n web interface:

  1. Go to Settings > Credentials > Add Credential
  2. Search for "Telegram API"
  3. Name: Telegram API
  4. Access Token: paste your bot token from @BotFather

3. Import Workflow

  1. Download n8n-workflow.json from this repository
  2. In n8n: Workflows > Import from File
  3. Select n8n-workflow.json
  4. When prompted, map the Telegram API credential

4. Configure Your User ID

The workflow only responds to your Telegram user ID. To set it:

  1. Open the imported workflow
  2. Find the IF User Authenticated node
  3. Click to edit, find the condition with rightValue
  4. Change 563878771 to your Telegram user ID
  5. Repeat for IF Callback Authenticated node
  6. Save the workflow

5. Activate Workflow

  1. Click the "Active" toggle in the top-right corner
  2. Test by sending "status" to your bot in Telegram

Usage

Send commands via Telegram or use the persistent menu buttons:

Command Description
status View all containers with status indicators
start <name> Start a stopped container
stop <name> Stop a running container
restart <name> Restart a container
update <name> Pull latest image and recreate container
logs <name> [lines] View container logs (default: 50 lines)

Container names support partial matching. For example, start plex will match linuxserver-plex.

Menu Buttons

Send /start or any unrecognized text to display the persistent keyboard with quick-access buttons for all commands.

Security

The bot only responds to the Telegram user ID configured in the IF nodes. Messages from other users are silently ignored.

License

MIT

S
Description
No description provided
Readme MIT 1.3 MiB
Languages
Markdown 100%