Set up an MTProto proxy by renting a small VPS, opening one TCP port, running Telegram’s proxy container, and sharing the generated secret link. That is the whole game. Telegram has reported 900 million monthly active users, so even a tiny proxy can help a small team, family, or community stay connected when normal access gets weird [source: Telegram].
TLDR: Get a cheap Ubuntu VPS, install Docker, run the official Telegram MTProto proxy image, then copy the tg://proxy link from the logs. For example, a $5 per month server with 1 CPU and 1 GB RAM is usually enough for a small group of 20 to 100 users. If your friends keep saying “Telegram is stuck on connecting,” this setup gives them a direct proxy link to try. Most of the work takes about 10 to 15 minutes, unless your VPS control panel decides to be dramatic.
What Is an MTProto Proxy?
An MTProto proxy is a special proxy made for Telegram. It is not a normal web proxy. It does not send all browser traffic through your server. It only helps Telegram apps connect using Telegram’s own MTProto protocol.
Think of it like a private side door for Telegram. Your phone or laptop uses that door. The proxy passes Telegram traffic between you and Telegram’s servers.
This is useful when Telegram is slow, blocked, or unstable on a network. It can also help groups that need a backup way to connect.
The catch is… server setup guides often make this sound like rocket science. It is not. You need one server, one port, and one secret key.
What You Need Before You Start
Here is the simple shopping list:
- A VPS with Ubuntu 22.04 or 24.04.
- Root access or a user with sudo rights.
- A public IP address.
- One open TCP port, usually 443.
- Docker, because it makes life less annoying.
A basic VPS is fine. You do not need a monster server. For a small private proxy, 1 GB RAM is often enough. Pick a server location close to your users. If most users are in Europe, use a European data center. If they are in Asia, choose one nearby.
Port 443 is a popular choice. It is the same port used by HTTPS traffic. That makes it convenient. If port 443 is already used, pick another port like 8443 or 9443.
Step 1: Connect to Your Server
After you buy the VPS, you will get an IP address. Open your terminal. Connect with SSH:
ssh root@YOUR_SERVER_IP
Replace YOUR_SERVER_IP with the real IP. If your VPS host gave you another username, use that instead.
Once inside, update the server:
apt update && apt upgrade -y
This may take a minute. Sometimes it takes longer because package mirrors are slow. Honestly, it feels like servers enjoy wasting 40 extra seconds right when you are feeling productive.
Step 2: Install Docker
Docker lets you run the proxy in a tidy container. Install it with:
apt install docker.io -y
Start Docker and enable it at boot:
systemctl start docker
systemctl enable docker
Check that Docker works:
docker --version
If you see a version number, you are good.
Step 3: Open the Firewall Port
If your server uses UFW, allow SSH and the proxy port:
ufw allow ssh
ufw allow 443/tcp
ufw enable
If you use a cloud firewall, open port 443 TCP there too. This step is easy to miss. The server may be perfect, but the cloud firewall can still block everything. Annoying? Very.
Image not found in postmeta
Step 4: Run the MTProto Proxy
Now run the official Telegram proxy container:
docker run -d \
--name mtproto-proxy \
--restart always \
-p 443:443 \
-v proxy-config:/data \
telegrammessenger/proxy:latest
That command does a few things:
- -d runs it in the background.
- –name gives it a friendly name.
- –restart always starts it again after a reboot.
- -p 443:443 maps the public port to the container.
- -v proxy-config:/data saves proxy data.
Wait a few seconds. Then check the logs:
docker logs mtproto-proxy
You should see a proxy link. It will look something like this:
tg://proxy?server=YOUR_SERVER_IP&port=443&secret=YOUR_SECRET
Copy that link. That is the magic ticket.
Step 5: Add the Proxy in Telegram
Send the link to yourself first. Open it on your phone or desktop. Telegram should ask if you want to add the proxy.
You can also add it by hand:
- Open Telegram.
- Go to Settings.
- Open Data and Storage.
- Tap Proxy Settings.
- Choose Add Proxy.
- Select MTProto.
- Enter the server IP, port, and secret.
Turn it on. Telegram should connect through your proxy. If it fails, check the port, firewall, and secret. Most problems live there.
How to Share It Safely
Do not post your proxy link everywhere unless you want random people using your bandwidth. Share it with trusted users only.
A simple user case helps. Say Ana runs a 35 person study group. Telegram works badly on the campus Wi Fi during exams. She sets up one MTProto proxy on a small VPS. She shares the link in a backup email thread. When Telegram gets stuck, students tap the link and reconnect in seconds.
That is the sweet spot. Small group. Clear need. Simple setup.
Basic Maintenance
Check if the container is running:
docker ps
Restart it if needed:
docker restart mtproto-proxy
Update the image from time to time:
docker pull telegrammessenger/proxy:latest
docker stop mtproto-proxy
docker rm mtproto-proxy
Then run the original Docker command again. Because you used the same volume, your saved data should remain.
Also update Ubuntu monthly:
apt update && apt upgrade -y
Image not found in postmeta
Quick Troubleshooting
- No link in logs? Run docker logs mtproto-proxy again after 10 seconds.
- Telegram will not connect? Check your firewall and cloud security rules.
- Port 443 is busy? Use 8443 and change the Docker port mapping.
- Server feels slow? Pick a VPS closer to your users.
- Too many strangers using it? Create a new proxy secret and share it only with trusted people.
Final Tips
Use a clean VPS. Do not run the proxy on your personal laptop. Keep the server updated. Keep the secret private. Watch your bandwidth if your VPS plan has a low monthly limit.
An MTProto proxy is not fancy. That is the nice part. It is small, direct, and useful. Set it up once, save the link, and you have a backup path for Telegram when the normal route acts up.