telegrammessenger/proxy image with a secret you generate, and open the tg:// link from the container logs in Telegram. Only people who have the link and secret can use it.
An MTProto proxy relays Telegram traffic through your server, which helps when Telegram is slow or unreliable on your network. Check that using a proxy is legal where you and your users are.
Prerequisites
- A FlashRDP Linux VPS with Ubuntu 22.04/24.04 or Debian 12. BRONZE is enough for personal use.
- An SSH connection as
root.
Step 1: Install Docker
Install Docker Engine with Docker’s official convenience script:get-docker.sh before running it. Docker also documents a manual repository install for production servers.
Step 2: Generate a secret
The proxy needs a 32-character hexadecimal secret (16 random bytes):Step 3: Start the proxy container
Run Telegram’s official image, replacingYOUR_SECRET with the value from Step 2:
443 is the default. To use another port, change the left side (for example -p 8443:443) and use that port in your link.
Telegram’s official image hasn’t had a new
latest release since 2020. It still works, but if you need newer features such as fake-TLS secrets, look at a maintained alternative such as mtg and follow its own documentation.Step 4: Get your connection link
The container logs show your links:port=443 in the link to match.
Step 5: Connect in Telegram
- Copy the
tg://proxy?...link. - Open it on a device with Telegram installed, or paste it into your Saved Messages and tap it.
- Tap Connect Proxy. Telegram now routes its messaging traffic through your server.