Building a Telegram bot usually involves more than writing a few lines of JavaScript. Developers need to create the bot, configure a backend, connect it to Telegram, arrange persistent storage and deploy everything to a hosting environment.
For a small project, managing this infrastructure can take more time than developing the actual application.
Telegram Serverless offers a different approach. It provides an environment where developers can run Telegram bot and Mini App backend code directly on Telegram’s infrastructure without maintaining a separate VPS or continuously running server.
Developers write JavaScript modules, organize their project locally and deploy through the tgcloud command-line tool. Telegram handles the supported execution environment and provides services such as Bot API access, database storage and outbound HTTP.
The platform has also expanded beyond traditional bot backends. Its October 6, 2026 update introduced Mini App frontend hosting and backend endpoints, allowing developers to deploy an interactive frontend alongside its Telegram-connected backend.
This makes Telegram Serverless particularly interesting for JavaScript developers, indie makers and teams exploring bots, productivity applications, AI assistants and interactive Telegram experiences.
In this guide, we’ll explore what Telegram Serverless is, how its architecture works, what developers can build, and which limitations they should understand before choosing the platform.
What Is Telegram Serverless?
Telegram Serverless is a cloud development environment for running the backend of Telegram bots and Mini Apps on Telegram’s infrastructure.
In traditional development, a bot usually requires a backend application hosted on a VPS, cloud server or another hosting platform. Developers are responsible for deployment, server availability, application processes and database connections.
Telegram Serverless changes that infrastructure model.
Instead of deploying a conventional Node.js server, developers create a project containing JavaScript modules. Telegram executes these modules in isolated V8 environments when the relevant bot update or Mini App endpoint is invoked.
The platform provides several built-in capabilities:
- Serverless runtime: Executes JavaScript modules without requiring developers to maintain a separate server.
- Bot API integration: Provides access to Telegram bot functionality through the platform SDK.
- Persistent database: Provides SQLite-backed storage for each bot.
- Outbound HTTP: Allows applications to communicate with supported external services.
- Mini App hosting: Serves frontend build files associated with a Telegram bot.
- Backend endpoints: Allows Mini Apps to communicate with backend modules.
- CLI deployment: Provides project management and deployment through
tgcloud.
The result is a Telegram-focused development environment where developers can concentrate on application logic instead of managing the infrastructure required to run a conventional bot backend.
Telegram Serverless Is Not Ordinary Node.js Hosting
This distinction is important.
Although developers use JavaScript and Node.js locally to run the CLI, the deployed application does not operate as a conventional Node.js server.
Telegram Serverless uses its own JavaScript module environment and platform SDK. It does not provide arbitrary npm packages, a normal server filesystem or unrestricted access to Node.js APIs.
Developers import their own project modules and the supported platform SDK to access the available services.
Node.js is required locally for the development and deployment tooling. It does not mean that deployed backend modules have the complete Node.js runtime available.
Why Did Telegram Introduce Serverless Hosting?
Telegram bots have developed beyond simple command-based interactions.
Today, developers can create assistants, productivity tools, shopping experiences, interactive games and applications that communicate with external services.
As these projects become more complex, their backend requirements also increase.
A basic bot might only need to respond to messages. A more advanced application could require:
- Persistent user information.
- Database queries and updates.
- External API integrations.
- Order and task management.
- Interactive frontend interfaces.
- Application-specific backend logic.
With traditional hosting, developers must assemble and maintain the infrastructure needed for these features.
That often means configuring a server, managing deployment credentials, maintaining the application process and connecting a database before the actual product is ready.
Telegram Serverless brings several of these capabilities into a single Telegram-oriented environment.
Its main purpose is to reduce infrastructure management for developers building products around Telegram.
This is especially useful for indie makers and developers experimenting with new ideas. They can work locally, deploy their project and use platform-provided services without first assembling an independent backend stack.
How Does Telegram Serverless Work?
Telegram Serverless follows a project-based development and deployment workflow.
Developers create their application locally, organize the JavaScript modules and frontend files, and use the tgcloud CLI to connect and deploy the project.
The deployed application then uses Telegram’s infrastructure to process bot updates and Mini App requests.
Telegram Serverless Architecture
The overall workflow looks like this:
┌─────────────────────────────────┐
│ Developer's Computer │
│ │
│ JavaScript Modules │
│ Mini App Frontend │
│ Project Configuration │
└────────────────┬────────────────┘
│
▼
┌─────────────────────────────────┐
│ tgcloud CLI │
│ │
│ Login · Run · Push · Migrate │
└────────────────┬────────────────┘
│
▼
┌─────────────────────────────────┐
│ Telegram Serverless Cloud │
│ │
│ ┌────────────┐ ┌────────────┐ │
│ │ V8 Runtime │ │ SQLite DB │ │
│ └────────────┘ └────────────┘ │
│ │
│ Bot API · Outbound HTTP │
│ Mini App Hosting · Endpoints │
└────────────────┬────────────────┘
│
▼
┌─────────────────────────────────┐
│ Telegram Users │
│ │
│ Bot Conversations │
│ Mini App Interactions │
└─────────────────────────────────┘
The developer maintains the project locally. The CLI connects that project to Telegram’s infrastructure and deploys the supported modules and Mini App build files.
When a bot update arrives, Telegram routes it to the appropriate handler. When a Mini App calls a backend endpoint, the platform executes the corresponding endpoint module.
The application can then use the Bot API, database and supported outbound HTTP functionality through the platform SDK.
1. JavaScript Modules and the V8 Runtime
Developers write backend functionality as JavaScript modules instead of creating a permanently running server process.
Telegram executes these modules in isolated V8 environments.
V8 is the JavaScript engine used by technologies such as Chrome and Node.js. However, using V8 does not mean Telegram Serverless provides the complete Node.js runtime.
A project is organized around a tgcloud/ directory.
| Project directory | Responsibility |
|---|---|
handlers/ | Processes Telegram update types |
endpoints/ | Provides backend functions for Mini Apps |
lib/ | Contains reusable project modules |
schema.js | Defines application database tables |
For example, a message handler can receive an incoming Telegram message, read or update a database record and send a response.
The platform invokes the handler when the relevant update arrives. Developers do not need to keep a custom server process running simply to receive and process those updates.
2. The Built-in SQLite Database
Applications often need to remember information between user interactions.
A productivity bot might store tasks. A shopping Mini App might store product selections. An AI assistant might save user preferences or conversation metadata.
Telegram Serverless provides each bot with a persistent SQLite-backed database.
Developers define their database schema in tgcloud/schema.js and access data through the platform database SDK.
The query builder follows familiar Drizzle-style patterns, including table definitions, selections, inserts, updates and SQL expressions.
For example, a simplified table definition looks like this:
import { table, integer } from 'sdk/db';
export const counters = table('counters', {
chatId: integer('chat_id').primaryKey(),
seen: integer('seen').notNull().default(0),
});
This example describes a table that stores a counter for each chat.
The table declaration is part of the project schema. Database changes are applied through the platform’s migration workflow rather than by manually connecting to a database server.
There is an important limitation: the runtime does not support foreign keys. Developers must manage relationships and referential integrity in their application logic.
SQLite is useful for structured data associated with a bot, but it should not be treated as an automatic replacement for every database architecture.
Projects requiring a different database engine, advanced relational features or a separate data platform should evaluate those requirements before choosing this environment.
3. Telegram Bot API and Outbound HTTP
A Telegram bot needs to communicate with Telegram.
In a conventional project, the backend makes requests to the Bot API using a client library or direct HTTP calls. Developers also configure credentials and manage the connection between their backend and Telegram.
Telegram Serverless provides Bot API access through its SDK.
This allows a handler to perform bot operations as part of its normal execution. For instance, a message handler can receive a user’s message and send a response.
The environment also supports outbound HTTP through its provided fetch functionality.
This is useful when an application needs information or processing from an external service.
Examples include:
- Retrieving weather information.
- Reading product data from another service.
- Connecting to an external AI API.
- Communicating with supported third-party services.
However, external HTTP access does not mean that the runtime has unrestricted network access.
Developers should use the supported SDK interface and account for the platform’s documented request and response constraints.
4. Mini App Hosting and Backend Endpoints
One of the most important additions arrived on October 6, 2026.
Telegram Serverless introduced Mini App frontend hosting and backend endpoints, allowing developers to deploy an application’s frontend alongside its bot backend.
Previously, developers often had to manage the Mini App frontend and bot backend as separate deployment concerns.
With the new arrangement, a project can contain both.
The frontend can be built with React, Vue, Svelte or plain HTML using Vite or another suitable bundler. The resulting static build files are hosted by Telegram Serverless.
The hosting configuration is defined in tgcloud.jsonc. A typical Vite project uses the dist directory as its build output.
After deployment, the Mini App is served from a project-specific tgcloud.ai address.
The backend uses modules inside tgcloud/endpoints/. A frontend can call an endpoint through the Mini Apps SDK:
Telegram.WebApp.Serverless.call(
'getProfile',
{ lang: 'en' },
function (err, profile) {
if (err) {
console.error(err.message);
return;
}
console.log(profile);
}
);
The endpoint receives the input and a context containing verified Mini App initialization data. This allows the backend to identify the Telegram user associated with the call.
That verification is important. The backend should not treat arbitrary user information supplied by the frontend as trusted identity data.
Frontend hosting and backend endpoints make Serverless more useful for interactive applications than a bot-only architecture.
However, the feature does not turn Telegram Serverless into a general-purpose website hosting platform. The frontend hosting and endpoints are designed for a Mini App associated with the bot.
What Can You Build with Telegram Serverless?
Telegram Serverless is designed for Telegram-connected applications. Its capabilities make several types of projects possible.
AI Chatbots and Assistants
Developers can build conversational assistants that respond to messages, save user preferences and maintain application state.
An AI assistant could accept a question, call an external model API through the supported HTTP interface, store relevant conversation information and return a response through Telegram.
The external AI provider remains a separate service. Telegram Serverless does not automatically include free access to Claude, OpenAI models or other AI inference providers.
Productivity Applications
Task managers, habit trackers, personal organizers and reminder tools are natural examples.
A task-management bot could store user tasks in its database and provide commands for adding, listing and completing them.
A Mini App could provide a richer interface for viewing and editing those records.
Small Online Stores
A Telegram shopping experience could combine product browsing, cart management and order-related backend logic.
The Mini App could present product information and interactive selection controls, while backend endpoints manage application data and bot interactions.
Developers would still need to evaluate payment integration, order security and any external services required by the business.
Games, Quizzes and Utilities
Telegram Serverless can support games and lightweight interactive tools that need persistent user or game data.
Examples include:
- Quizzes and trivia games.
- Leaderboards.
- Calculators and converters.
- Interactive challenges.
- Personal score tracking.
These examples illustrate the types of Telegram-focused products the architecture can support. They do not imply that every game or application workload will fit the platform’s runtime and resource constraints.
How Is Telegram Serverless Different from Traditional Hosting?
The biggest difference is the infrastructure model.
With a traditional VPS, developers rent or manage a server and decide how the bot process runs. They are responsible for operating-system maintenance, application deployment, server security and the availability of their process.
With Telegram Serverless, the platform manages the execution infrastructure for supported bot and Mini App workloads.
| Area | Traditional VPS Hosting | Telegram Serverless |
|---|---|---|
| Infrastructure | Developer manages or configures a server | Telegram manages the runtime infrastructure |
| Backend execution | Usually a persistent process or server | Modules execute through platform invocations |
| Runtime | Depends on the chosen server environment | Isolated V8 JavaScript environment |
| Database | Developer selects and manages a database | Built-in SQLite-backed database |
| Bot API integration | Developer connects using a library or HTTP | Platform SDK provides Bot API access |
| Deployment | Depends on the chosen hosting workflow | tgcloud CLI |
| Mini App frontend | Usually hosted separately or on the VPS | Static build can be deployed with the bot |
| Backend endpoints | Developer builds and hosts routes | Platform-managed Mini App endpoints |
This does not mean Telegram Serverless is better for every project.
A VPS offers more control over the runtime, packages, background processes, filesystem and infrastructure architecture.
Telegram Serverless reduces infrastructure management, but its predefined environment imposes constraints.
The decision should depend on the product’s requirements, not simply on whether a hosting option avoids server administration.
Can You Build Telegram Serverless Apps Using Claude Code?
Yes. Telegram’s developer documentation includes support for AI-assisted development workflows.
A new project includes an AGENTS.md file and a reference document for the Telegram Serverless SDK. These provide coding agents with project-specific conventions and technical information.
This is useful because the runtime differs from a conventional Node.js environment.
An AI coding tool needs to understand details such as:
- SDK import rules.
- Module organization.
- Asynchronous database operations.
- Deployment workflow.
- Supported runtime functionality.
Telegram’s documentation demonstrates using tools such as OpenCode, Claude Code and Cursor with project instructions.
For example, a developer could ask an AI coding assistant to create a to-do bot that stores tasks and displays them when a user sends a command.
The coding assistant can work with the project’s schema and handler modules. The developer can then review the generated changes, test them and deploy the project using the CLI.
There are two important qualifications:
- AI-generated code still needs review, testing and security checks. Project documentation does not guarantee correct application logic.
- Using Claude Code or another AI coding assistant does not mean that AI model inference is included in Telegram hosting. The cost and terms of the coding assistant or any external model API remain separate.
AI assistance can reduce implementation work, but developers remain responsible for the applications they deploy.
Is Telegram Serverless Free?
Cost is an important consideration when evaluating a new development platform.
Public coverage has described Telegram Serverless as free cloud infrastructure for developers. However, the official developer documentation does not provide a detailed public pricing schedule, guaranteed resource quotas or an unlimited-usage commitment.
It would therefore be inaccurate to describe the service as unlimited free hosting.
Developers should distinguish between several cost categories:
| Cost category | What to consider |
|---|---|
| Telegram Serverless hosting | Check current official terms and any published usage limits |
| External APIs | Providers may charge for requests or data usage |
| AI inference | Model providers charge separately according to their pricing |
| AI coding assistants | Claude Code and other development tools have their own plans and limits |
| Other integrations | Payment, email, analytics and other services may have separate fees |
Before launching a production application, check the latest official documentation and platform terms for resource limits, availability and any applicable charges.
A free or low-cost development environment should not be mistaken for a guarantee that every dependency or production workload will also be free.
Limitations Developers Should Know
Telegram Serverless simplifies deployment, but it does not provide unrestricted cloud computing.
Understanding its limits before choosing the platform can prevent architectural problems later.
JavaScript Runtime, Not Full Node.js
Backend modules execute in Telegram’s isolated V8 environment. Developers cannot assume that every Node.js API is available.
A module should use the supported platform SDK and the project’s own JavaScript modules.
No npm Packages at Runtime
The runtime exposes the platform SDK and modules within the deployed project. It does not provide a normal node_modules environment for importing arbitrary npm dependencies.
This affects library selection and application architecture.
A package that works in a conventional Node.js server may not work directly in Telegram Serverless.
Developers should check whether its functionality can be implemented with the available runtime APIs or project modules.
No Normal Filesystem Access
Runtime code cannot access a traditional server filesystem.
Do not design the application around writing files to local disk or expecting a persistent directory to be available to backend modules.
Use the supported database and external services for persistent application data.
SQLite Has Specific Database Constraints
The built-in database is SQLite-backed, not a general-purpose PostgreSQL server.
One important restriction is the absence of foreign key enforcement.
Relationships between records need to be managed in application logic.
Projects that depend on database-level foreign keys or a different database architecture should account for this before migrating.
Execution Is Event- and Endpoint-Driven
The runtime executes code in response to Telegram updates and Mini App endpoint calls.
It is not designed around a permanently running application process.
A project that needs an always-running worker, a long-lived connection or continuous background processing may need a different architecture or an external service.
HTTP Response Limits
The documentation specifies a 30 MB cap for an outbound HTTP response.
Streaming can help process a response incrementally, but it does not remove the total response limit.
Applications that retrieve large files or datasets need to account for this constraint.
It Is Not a General-Purpose Hosting Platform
Telegram Serverless is built for Telegram bots and Mini Apps.
It should not be treated as a replacement for a VPS, unrestricted backend hosting, arbitrary website hosting or general cloud infrastructure.
The frontend hosting capability is specifically designed to serve a Mini App associated with the bot. It does not turn the environment into a general-purpose hosting service for unrelated websites.
Who Should Use Telegram Serverless?
Telegram Serverless is particularly interesting for developers whose products are already centered around Telegram.
JavaScript Developers
Developers can explore the platform without assembling a separate infrastructure stack for a basic bot backend.
Indie Makers
Independent developers can prototype Telegram-connected products and focus more time on product behaviour.
Bot Developers
Bot developers can use platform-provided database and Bot API integration instead of assembling every backend component themselves.
Mini App Developers
Mini App developers can deploy a static frontend and its Telegram-connected backend within one project.
AI-Assisted Developers
Developers can work with coding agents that have access to project-specific instructions and SDK documentation.
It may be less suitable for projects that require unrestricted Node.js APIs, arbitrary npm dependencies, long-running workers, a conventional filesystem or a different database engine.
The best fit is a product that benefits from Telegram’s ecosystem and can work within the platform’s execution model.
Frequently Asked Questions
1. What Is Telegram Serverless?
Telegram Serverless is a platform for running Telegram bot and Mini App backend code on Telegram’s infrastructure. Developers write JavaScript modules and deploy them using the tgcloud CLI. The environment provides a V8 runtime, Bot API integration, persistent SQLite-backed storage and outbound HTTP.
2. Is Telegram Serverless Free?
Public reports describe the infrastructure as free, but the official documentation does not establish a detailed public pricing schedule or an unlimited-usage guarantee. External API, AI inference and other service costs can apply separately. Check the current official terms before relying on a particular cost assumption.
3. Can I Host a Telegram Bot Without a VPS?
Yes. Telegram Serverless is designed to run a bot’s backend without requiring the developer to provision and maintain a separate VPS. You deploy the bot’s supported JavaScript modules through the tgcloud CLI.
4. Can I Build a Mini App Using Telegram Serverless?
Yes. The platform supports Mini App frontend hosting and backend endpoints. You can build the frontend using a suitable web framework or plain HTML, deploy its static build with the bot and expose backend functionality through endpoint modules.
5. Does Telegram Serverless Support React?
The frontend hosting workflow supports frontend build output produced by tools such as Vite. React projects built with Vite can therefore be used for a Mini App frontend. The deployed backend remains subject to Telegram Serverless’s JavaScript runtime restrictions.
6. Can I Use Claude Code with Telegram Serverless?
Yes. Telegram provides project instructions and SDK documentation intended to help AI coding agents understand its conventions. Claude Code is one of the tools that can work with this setup. AI assistant subscriptions and model API usage are separate from Telegram hosting.
7. Does Telegram Serverless Provide a Database?
Yes. Each bot gets a persistent SQLite-backed database. Developers define tables in schema.js and use the platform database SDK to query and update records. The database does not support foreign key enforcement.
8. Can I Host a Normal Website on Telegram Serverless?
The documented static hosting feature is designed for a Telegram bot’s Mini App frontend. It is not presented as general-purpose website hosting for unrelated websites. A conventional standalone website should use a hosting platform designed for that purpose.
9. Do I Need Node.js to Use Telegram Serverless?
The tgcloud CLI requires Node.js 18 or newer. Node.js runs the local development and deployment tooling; it does not mean the deployed backend has the complete Node.js runtime.
10. Is Telegram Serverless Suitable for Production Applications?
It can be considered for production Telegram bots and Mini Apps when their requirements fit the platform. Developers should evaluate runtime restrictions, database constraints, request limits, operational needs and current service terms before choosing it for a production workload.
Conclusion
Telegram Serverless changes how developers can approach building Telegram bots and Mini Apps.
Instead of arranging a separate server, database and deployment environment for every project, developers can work with a Telegram-focused runtime, platform SDK, persistent database and CLI workflow.
The October 2026 addition of Mini App hosting and backend endpoints makes the platform more capable for interactive products. Developers can now keep the frontend and Telegram-connected backend within one project and deploy them together.
But the platform has clear boundaries. It is not unrestricted Node.js hosting, does not support arbitrary npm packages at runtime and is not a general replacement for a VPS or a full database server.
For developers building products around Telegram, those trade-offs may be worthwhile.
The next step is to understand the project structure and build a small application.
That is where the next article in this series begins: How to Build Your First Telegram App with Telegram Serverless — A Beginner’s Step-by-Step Guide.