Can I run Telegram using my own server?
No. Telegram is a single unified cloud and does not support federation, so there is no supported way to run your own server and have it interoperate.
Why it is built that way
Federation would mean two users could end up on two different Telegram clouds. Messages, the contact graph, cloud history, sticker packs and channels would all have to reconcile across independent operators with different uptime, different security practices and different willingness to cooperate. The design treats one account reaching every other account identically as a property worth keeping, and that property is what federation would give up.
What is open, and what is not
| Open | Not available |
|---|---|
| Client applications, as source | The server implementation |
| The MTProto protocol specification | Running an interoperating instance |
| Client API and Bot API | Federating with the main network |
So you can build your own client, or software that talks to Telegram, but not your own Telegram.
What you can self-host
- A local Bot API server. Running the Bot API yourself removes several of the limits that apply to the public endpoint, including much larger file transfers.
- Anything built on TDLib. Your own client or automation runs entirely on your own infrastructure, while still connecting to the Telegram network.