Telegram Serverless: Run Bot Backends Without Servers
Telegram Serverless runs bot and Mini App backend code in an isolated V8 sandbox with no infrastructure, using a CLI for deploys and database migrations.
Telegram has introduced Serverless, a platform that lets developers run backend code for bots and Mini Apps directly on Telegram's infrastructure. Instead of provisioning VPS instances or cloud functions, developers write plain JavaScript modules and deploy them with a single CLI command; the code executes in an isolated V8 sandbox alongside the Bot API and a built-in SQLite database.
Projects follow a simple structure: handlers/ for update-type entry points, lib/ for shared code, and schema.js for database table definitions. The tgcloud CLI bridges the local project folder and the deployed cloud copy, offering commands like push, migrate, status, and diff. Notably, code deployment and database schema migrations are kept as deliberately separate steps to prevent unexpected data changes during a code push.
By bundling the Bot API, database, and outbound HTTP access into every module by default, Serverless removes the traditional infrastructure layer entirely — no servers to rent, patch, or monitor. It targets a broad range of use cases: conversational AI bots, Mini App backends, games with leaderboards, and automations that integrate third-party APIs.