Skip to content
NanoFleet NanoFleet

Telegram Channel

Connect a NanoFleet agent to Telegram using a Telegram bot. Users interact with the agent via direct messages to the bot.

Step 1 — Create a Telegram bot

  1. Open Telegram and message @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the bot token (format: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)

Via NanoFleet UI

On the Fleet Dashboard, click the radio icon on the agent card you want to connect. A dialog opens — fill in:

FieldDescription
Bot TokenYour Telegram bot token (required)
Allowed UsersOptional comma-separated Telegram user IDs (restricts access)
Notification User IDOptional Telegram user ID for proactive notifications

Click Deploy. The channel container starts automatically.

Via standalone Docker Compose

Add the Telegram channel service to your docker-compose.yml:

services:
  agent:
    image: ghcr.io/nanofleet/nanofleet-agent:latest
    restart: unless-stopped
    environment:
      ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
      AGENT_MODEL: claude-sonnet-4-5
    volumes:
      - ./workspace:/app/workspace

  telegram:
    image: ghcr.io/nanofleet/nanofleet-channel-telegram:latest
    restart: unless-stopped
    environment:
      AGENT_URL: http://agent:4111
      TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
      ALLOWED_USERS: ${ALLOWED_USERS}
      NOTIFICATION_USER_ID: ${NOTIFICATION_USER_ID}
    depends_on:
      - agent

Environment variables

VariableRequiredDescription
AGENT_URLYesInternal URL of the agent container
TELEGRAM_BOT_TOKENYesBot token from @BotFather
ALLOWED_USERSNoComma-separated Telegram user IDs allowed to send messages
NOTIFICATION_USER_IDNoTelegram user ID to receive proactive notifications

Upgrade

Via dashboard: Click Upgrade next to the channel in the Channels list.

Via Docker Compose:

docker compose pull telegram
docker compose up -d telegram