Skip to main content

Telegram Serverless hosts bots and Mini Apps without a server

Our write-up of a story first reported by PirateCPA

Telegram Serverless hosts bots and Mini Apps without a server

Telegram Serverless lets developers host bots and Mini Apps without renting their own server. The developer uploads code and Telegram handles execution. No infrastructure to configure. Code is written in JavaScript, modules run in the V8 environment, and the platform requires Node.js 18 or newer.

Platform features

Handlers respond to commands, regular messages and button clicks. Each event type can be routed to a separate function. A built-in SQLite database stores user data, applications and interaction history, and the data persists after a function finishes running. The platform supports HTTP requests, so external APIs can be connected and data passed between systems. Mini App files are also hosted there. Users open them directly inside the messenger.

Project management runs through the tgcloud command-line tool and @BotFather. Third-party npm packages cannot be connected directly. Only the Telegram Serverless SDK and the project's own modules are available.

To deploy, enable Serverless in the bot settings through @BotFather. Create the project with npm create @tgcloud/bot and connect the bot using a token from the Serverless section. Write the handler code. Publish with npx tgcloud push. If the database structure changes, run npx tgcloud migrate.

Traffic arbitrage use

The platform covers several tasks inside Telegram. A bot can receive applications and store them in the built-in database. Automatic notifications can be sent about new events. Mini Apps with forms or registration pages can be built for ad campaigns. Bots can run surveys and categorize users.

Telegram Serverless does not replace a full arbitrage infrastructure. Keitaro or Binom cannot run on it. Ad landing pages, traffic routing and postbacks need a separate server and specialized tools.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor