Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ragnarok22/telegram-bot-api-docker/llms.txt

Use this file to discover all available pages before exploring further.

Telegram Bot API Docker

Self-hosted Telegram Bot API server with minimal Alpine runtime, multi-arch support, and full configuration control

Why Self-Host?

Running your own Telegram Bot API server gives you complete control over your bot infrastructure.

No File Size Limits

Upload and download files up to 2GB instead of the 50MB limit on the official API

Local File Access

Enable local mode to serve files directly from your server without uploading to Telegram

Full Control

Configure webhook connections, logging, and all server parameters to match your needs

Privacy & Security

Keep your bot traffic and data within your own infrastructure

Key Features

Minimal Runtime

Alpine-based image under 50MB with only essential dependencies

Multi-Architecture

Native support for amd64 and arm64 platforms including Apple Silicon

Secure by Default

Runs as non-root user with minimal attack surface

Environment Config

Configure everything via environment variables - no config files needed

Health Checks

Built-in health check endpoints for monitoring and orchestration

Automated Releases

CI/CD pipeline ensures reliable multi-arch builds and releases

Quick Example

Get your bot running in under 2 minutes:
1

Pull the image

docker pull ragnarok22/telegram-bot-api-docker
2

Set your credentials

Get your API credentials from https://my.telegram.org
export TELEGRAM_API_ID=12345
export TELEGRAM_API_HASH=1234567890abcdef1234567890abcdef
3

Start the server

docker run -d --name telegram-bot-api \
  -e TELEGRAM_API_ID=$TELEGRAM_API_ID \
  -e TELEGRAM_API_HASH=$TELEGRAM_API_HASH \
  -p 8081:8081 -p 8082:8082 \
  -v "$(pwd)/data:/data" \
  ragnarok22/telegram-bot-api-docker
4

Test the connection

curl http://localhost:8081/bot<YOUR_BOT_TOKEN>/getMe

Ready to Get Started?

Quickstart Guide

Get your server running in minutes

Configuration Reference

Learn about all available options

Docker Setup

Detailed Docker deployment guide

Docker Compose

Deploy with Docker Compose