-
Notifications
You must be signed in to change notification settings - Fork 47
telegram bot api
stefano edited this page Nov 27, 2025
·
1 revision
hosting your own telegram bot api can help you avoid limits on file sizes and improve performance when downloading media through the bot.
you can either host your own bot api using the official telegram bot api source code or use other third-party implementations.
- aiogram/telegram-bot-api: official telegram bot api, maintained by the aiogram team.
- tdlight/tdlightbotapi: a high-performance, memory-optimized bot api, maintained by the tdlight team.
since govd uses an internal network with docker, you can either:
- add the bot api service to the existing
docker-compose.yamlfile. - create a shared network and connect both the bot api and govd services to it.
here's an example with a shared network:
docker network create govd-sharedstart your bot api container connected to the shared network. for example, using tdlight/tdlightbotapi:
docker run -d --name bot-api \
-e TELEGRAM_API_ID=123 \
-e TELEGRAM_API_HASH=YOUR_API_HASH \
-p 8081:8081 \
--network govd-shared \
tdlight/tdlightbotapimodify the docker-compose.yaml file to connect to the shared network:
services:
bot:
...
networks:
- govd-network
- govd-shared
...
networks:
govd-network:
driver: bridge
govd-shared:
external: trueupdate your environment variable in the .env file to point to your bot api service:
BOT_API_URL=http://bot-api:8081