// DevOps
Case: Launching and Registering an MTProto Proxy in 5 Minutes Using Docker
Published on 2026-09-22
Link to check how the installed Telemt works
Update: September 2026
Before deploying the official image, note its status:
- The image is hardly updated. The tag
telegrammessenger/proxy:latest(aka1.4) was last published on February 28, 2020. In April 2026 a2.0betatag appeared in the repository, but it is not documented in the image documentation, and relying on it in production is risky. - Fake TLS (secret with prefix
ee) is not documented in the official image. The image is configured only with theSECRET,SECRET_COUNT,TAGandWORKERSvariables. It does not offer masquerading as a TLS connection to a third-party domain. - The
ddmode (random packet alignment) is enabled on the client side — by theddprefix in the link. The secret is passed to the server without the prefix.
Therefore for a new proxy we recommend Telemt — an MTProxy server in Rust that supports Fake TLS, is regularly updated, and runs in Docker on port 443:
- Telemt: installing MTProxy in Docker on port 443 with Fake TLS
- Telemt: web proxy for Telegram (WEB mode)
The official image is still suitable for quick checks and simple scenarios. Below — how to run it correctly.
Task
Run your own MTProto proxy, register it in Telegram to see statistics, and optionally link a sponsor channel to it.
Solution: Docker and the official image
- Docker runs the proxy in an isolated container without installing dependencies on the server. All configuration is described in a single
docker-compose.ymlfile. telegrammessenger/proxy— image from the Telegram team. It implements the MTProto protocol and can accept up to 16 secrets simultaneously.
docker-compose.yml configuration
services:
mtproto:
image: telegrammessenger/proxy:1.4
container_name: mtproto
restart: unless-stopped
ports:
- "443:443/tcp"
environment:
# 16 bytes in hexadecimal, lowercase: exactly 32 characters, without the dd prefix
- SECRET=0123456789abcdef0123456789abcdef
# Tag from @MTProxybot — add after registration
# - TAG=your_tag
volumes:
- proxy-config:/data
volumes:
proxy-config:What matters
Image. Tag
1.4is the same aslatest; specifying the version protects against unexpected swaps.Restart.
restart: unless-stoppedbrings the proxy up after a crash or server reboot.Port 443. The standard HTTPS port is less often blocked by provider networks. If you map a different external port to the container, use that same port in the client link.
SECRET. Exactly 16 bytes in hexadecimal — 32 characters. Generate:
bashhead -c 16 /dev/urandom | xxd -psIf the
SECRETvariable is not set, the image will generate the secret itself and show it in the logs:docker compose logs mtproto. Multiple secrets can be listed separated by commas.Volume
proxy-config. Preserves the generated secret and settings between restarts.
Start and connection link
Save the configuration as
docker-compose.ymland start the proxy:bashdocker compose up -dForm the link. To have the client enable random packet alignment mode, add the
ddprefix to the secret — only in the link, not inSECRET:tg://proxy?server=YOUR_IP&port=443&secret=ddYOUR_SECRETFor example:
tg://proxy?server=203.0.113.10&port=443&secret=dd0123456789abcdef0123456789abcdefWhen opening the link, Telegram will offer to add the proxy.
Update the image — as new versions are released (rarely):
bashdocker compose pull && docker compose up -d
Registering the proxy via the bot
Registration provides connection statistics and the ability to show a sponsor channel to users.
Open the official bot @MTProxybot in Telegram and send the command
/newproxy.Send the server address and port, for example
203.0.113.10:443.Send the secret — the same 32-character key as in
SECRET, without theddprefix.The bot will register the proxy and issue a tag.
Add the tag to
docker-compose.yml(theTAG=line) and restart the container:bashdocker compose up -dThe tag is not saved in the volume: the image takes it only from the environment variable at each start.
After that, statistics and sponsor channel binding are available in the bot: users of your proxy will see a link to the channel at the top of their chat list.
Summary
- The official image runs in minutes, but is hardly developed and does not document Fake TLS.
- The secret is 32 hexadecimal characters;
ddis added only in the client link. - The tag from @MTProxybot is passed via the
TAGenvironment variable at each start. - For a working proxy with Fake TLS and up-to-date updates — Telemt.
Link to check how the installed Telemt works
Need a turnkey MTProto proxy?
I'll set up the server, configure Fake TLS, and explain how to maintain it. Contact me — I'll reply on a business day.
Написать в Telegram →// Reviews
Related reviews
The collaboration left an extremely positive impression, primarily because of the professionalism and the approach to resolving issues as they arose.
The experience of working together left an extremely positive impression, above all because of the professionalism and the approach to solving the issues that arose.
Jitsi Meet: a personal Zoom — setup in Docker and on a VPS
2025-11-11 · ★ 5/5
I needed to get n8n, Redis, and the database working. I had hired another contractor before and everything kept breaking. I hired Mikhail, and the next day everything was working quickly, like clockwork!
There was a task to get n8n, redis and the database working. I had previously ordered from another contractor, it kept breaking all the time. Ordered from Mikhail, the next day everything started working fast, like …
n8n installation on your VPS server. Configuration of n8n, Docker, AI, Telegram
2025-09-24 · ★ 5/5
Thank you for the fast and excellent work. Everything was done promptly and just as needed!
Thank you for the quick and good work. Everything was done promptly and as needed!
n8n installation on your VPS server. Configuration of n8n, Docker, AI, Telegram
2025-09-06 · ★ 5/5
Quick solution — I highly recommend Mikhail as a contractor! I tried to build a similar configuration myself and even followed AI advice, which ended up costing a lot of time and money (due to server downtime). So my advice: hire professionals — it's cheaper =) Thanks to Mikhail for his professionalism.
Quick fix for the problem, I recommend Mikhail as a contractor to everyone! I tried to assemble a similar configuration myself and following advice from neural networks, which resulted in a lot of wasted effort and …
n8n installation on your VPS server. Configuration of n8n, Docker, AI, Telegram.
2025-08-25 · ★ 5/5
Mikhail completed the setup of another VPS. He quickly and professionally bypassed certain hosting providers' restrictions.
Mikhail completed the setup of another VPS. Quickly, professionally bypassing certain limitations of hosting providers.
n8n installation on your VPS server. n8n, Docker, AI, Telegram setup
2025-08-12 · ★ 5/5
Great job, thank you! Mikhail is a true professional — I recommend him!
Excellent work, thank you! Mikhail is a professional in his field, I recommend him!
N8n installation on your VPS server. Setup of n8n, Docker, AI, Telegram
2025-07-03 · ★ 5/5
// Contact
Need help?
Get in touch with me and I'll help solve the problem
I reply within one business day (03:00-13:00 GMT)
Или оставьте заявку здесь:
// Related