This open-source project by Miguel Piedrafita (m1guelpf) lets you run your own ChatGPT-powered Telegram bot with a single Docker command. It connects Telegram chats to OpenAI’s GPT models so you can talk to an AI assistant inside your messenger.
Self-hosting is the point: instead of trusting a third-party bot with your conversations, you deploy the bot yourself and connect it to your own OpenAI API key. The bot keeps conversation context per user, so follow-up questions work naturally, and configuration is handled through simple environment variables. Setup is a one-command Docker deployment, which made this one of the most popular early ChatGPT-on-Telegram implementations; the repository has over 3,800 stars on GitHub and is released under the MIT license. The code was last updated in 2023, so it reflects the GPT-3.5/GPT-4 era of the OpenAI API. Note that several bots share similar names; this listing is specifically the m1guelpf implementation.
The bot is free and open source under the MIT license. Your only cost is OpenAI API usage, billed to your own key based on the model and volume you use.
Developers and tinkerers who want a private, self-hosted AI assistant inside Telegram without depending on someone else’s bot service.