How to Unblock Telegram with Your Own MTProto Proxy — No VPN Needed!

Is Telegram blocked or hard to access where you are? Don’t worry! Setting up your own personal “proxy” server for Telegram is a straightforward and secure way to get connected again. Think of it like a private, direct tunnel for your Telegram app, and you’re in control!

This guide will show you how to create an MTProto proxy – Telegram’s own special proxy system – on your computer or a rented server (VPS). We’ll cover instructions for common computer types:

  • amd64 (also called x86_64): Most desktop PCs, laptops, and many servers.
  • ARM64 (also called aarch64): Newer Apple Mac computers (M1, M2, M3), Raspberry Pi, and some other devices.

No confusing tech talk, just simple, step-by-step directions!

What’s an MTProto Proxy Anyway?

MTProto proxy is a special kind of server designed by Telegram. When you use it, your Telegram app sends its messages through your server first. This helps you get around blocks and keeps your connection fast and private because you’re the one managing it.

Benefits:

  • Access Telegram: Works even if it’s restricted.
  • Faster & More Reliable: Often better than free, public proxies.
  • Secure: Your data goes through your server.
  • You’re in Control: No relying on unknown third-party services.

What You’ll Need (The Ingredients)

  • A Linux Computer or VPS: This is where your proxy server will live. A VPS (Virtual Private Server) is like renting a small computer on the internet. Ubuntu (version 20.04 or newer) is a good choice for the operating system.
  • Basic Command Line Access: You’ll need to type a few simple commands into a “terminal” window.
  • Docker Installed: Docker is a tool that makes running software (like our proxy) super easy. If you don’t have it, check out the official guide: How to install Docker.
  • A Little Patience: It’s not too hard, and I’ll guide you every step!

Step 1: Know Your Computer’s “Type” (Architecture)

Your computer’s processor has a type (architecture), which tells us which version of the proxy software to use.

  1. Open your terminal or command line.
  2. Type this command and press Enter: uname -m
  3. Look at the output:
    • If it says x86_64 or amd64: You have an amd64 machine.
    • If it says aarch64 or arm64: You have an ARM64 machine.

Jot this down – you’ll need it in the next step!

Step 2: Start Your Telegram Proxy Server!

We’ll use Docker to run the proxy. It’s like giving Docker a recipe, and it cooks up the server for you.

The command below does a few things:

  • Downloads and starts the official Telegram proxy software.
  • Names your proxy my-telegram-proxy so you can easily find it later.
  • Sets it up to listen for Telegram connections on port 4434 of your server. (You can change 4434 to another number like 8080 or 2086 if 4434 is already used by something else, but 4434 is a good start).
  • Automatically creates a super-secret password (called a “secret”) for your proxy.

Open your terminal and run this single command:

docker run -d --name my-telegram-proxy \
  -p 4434:443 \
  -e SECRET=$(openssl rand -hex 16) \
  telegrammessenger/proxy:latest

Important Note for ARM64 Users (e.g., Apple M1/M2/M3, Raspberry Pi): The command above uses telegrammessenger/proxy:latest, which is smart and should automatically work for ARM64 machines too! It’s designed to pick the right version for your computer.

IF you’re facing small WARNING: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Let’s follow this step:

Step 2.1 Enable Docker Emulation on ARM64 (Only for ARM64 Machines)

If you have an ARM64 machine but want to run amd64 images (most official images are amd64), enable QEMU emulation:

docker run --rm --privileged tonistiigi/binfmt --install all

This installs emulators that let you run amd64 Docker images on ARM64.

Alternative for ARM64 (If the above command gives an exec format error or for a potential performance boost): Build it Yourself

If you’re on an ARM64 machine and the command above doesn’t work (you might see an exec format error), or if you’re feeling a bit more adventurous and want to ensure it’s perfectly optimized, you can build the proxy software from scratch. It’s a few more steps:

  1. Install git if you don’t have it: sudo apt update && sudo apt install git -y
  2. Download the proxy source code:git clone https://github.com/TelegramMessenger/MTProxy.git
  3. Go into the downloaded folder:cd MTProxy
  4. Build your ARM64-specific proxy (this might take a few minutes):docker build -t my-arm64-mtproxy .
  5. Now run your self-built proxy (replace YOUR_CHOSEN_SECRET with a long random string you make up, or use $(openssl rand -hex 16) like before):docker run -d --name my-telegram-proxy-arm64 \ -p 4434:443 \ -e SECRET=$(openssl rand -hex 16) \ my-arm64-mtproxy
    (Remember the name my-telegram-proxy-arm64 if you use this method).

Step 3: Check if Your Proxy is Running

Let’s make sure your proxy server started correctly. Type this into your terminal:

docker ps

You should see something like this in the output list (the ID and other details will be different):

CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS          PORTS                               NAMES
a1b2c3d4e5f6   telegrammessenger/proxy:latest    "/bin/sh -c '/bin/ba…"   15 seconds ago   Up 14 seconds   0.0.0.0:4434->443/tcp, :::4434->443/tcp   my-telegram-proxy

(If you built it yourself on ARM64, the IMAGE and NAMES might be my-arm64-mtproxy and my-telegram-proxy-arm64)

The key things are seeing your container name (my-telegram-proxy or my-telegram-proxy-arm64) and Up ... seconds under STATUS. This means it’s running!

Step 4: Get Your Proxy Connection Details

To connect Telegram to your new proxy, you need three pieces of information:

  1. Your Server’s IP Address: This is the public internet address of your Linux machine or VPS. (e.g., 123.45.67.89).
  2. The Port Number: This is the port you chose in Step 2. If you used the command exactly as shown, it’s 4434.
  3. Your Secret: The proxy automatically generated a secret password. To find it, run this command (use my-telegram-proxy-arm64 if you used the ARM64 build method):docker logs my-telegram-proxy
    Look through the output. You should find a line that looks like this (the long string of letters and numbers is your secret): [+] Using secret 0: dd010101010101010101010101010101 Or it might say: Secret 1: dd010101010101010101010101010101The dd part means it’s a “simple” secret type, which is fine. Copy that whole long hexadecimal string (e.g., dd010101010101010101010101010101). This is your proxy secret.

Now, create your special Telegram proxy link:

It looks like this: tg://proxy?server=YOUR_SERVER_IP&port=YOUR_PORT&secret=YOUR_SECRET

image-2 How to Unblock Telegram with Your Own MTProto Proxy — No VPN Needed!

Keep this link handy!

Step 5: Add the Proxy to Your Telegram App

  1. Open Telegram on your phone or computer.
  2. Go to Settings.
  3. Find Data and Storage.
  4. Scroll down and tap on Proxy Settings (or Proxy).
  5. Tap Add Proxy (or the + icon).
  6. Choose MTProto as the proxy type.
  7. Carefully enter:
    • Server: Your server’s IP address.
    • Port: The port you used (e.g., 4434).
    • Secret: The secret you found.
  8. Save the settings.
  9. Enable the “Use Proxy” toggle.

Telegram should now connect through your personal proxy! You might see a shield icon near the top of your chat list.

SMALL Tips: Copy the link, paste it into the Telegram chat, and click on it. Telegram will help you set it up.

Crucial: Check Your Firewall!

Your server or VPS likely has a firewall. You must allow incoming connections on the port your proxy is using (e.g., 4434). How you do this depends on your VPS provider or Linux setup.

  • For ufw (common on Ubuntu):sudo ufw allow 4434/tcp sudo ufw enable # If not already enabled sudo ufw status # To check
  • Cloud Providers (AWS, Google Cloud, Azure, DigitalOcean, etc.): You’ll usually need to configure “Security Groups” or “Firewall Rules” in their web dashboard to open the port.
image How to Unblock Telegram with Your Own MTProto Proxy — No VPN Needed!

If you don’t open the port in your firewall, Telegram won’t be able to reach your proxy!

Troubleshooting Tips (If Things Go Wrong)

  • Connection Refused/Timeout:
    • Firewall: Double-check your firewall settings (see above). This is the most common issue!
    • Docker Not Running: Run docker ps again. Is my-telegram-proxy listed and “Up”? If not, try starting it: docker start my-telegram-proxy.
    • Wrong IP/Port: Verify the IP address and port in your Telegram settings.
    • Port Already in Use: If you suspect port 4434 (or your chosen port) is used by another service on your server, stop the container (docker stop my-telegram-proxy && docker rm my-telegram-proxy), then re-run the docker run command from Step 2 but change -p 4434:443 to something like -p 8080:443 (and update your firewall and Telegram settings accordingly).
  • exec format error on ARM64 (even with telegrammessenger/proxy:latest):
    • This means Docker might not have picked the correct ARM64 version of the image.
    • Try the “Alternative for ARM64: Build it Yourself” method from Step 2.
    • As a more general fix for running other non-ARM64 Docker images on ARM64, you can install universal binary support:docker run --rm --privileged tonistiigi/binfmt --install all
      Then try the original docker run command for telegrammessenger/proxy:latest again.
  • Check Logs for Clues: If your proxy container is running but not working, look at its logs for error messages:docker logs my-telegram-proxy
    (Or docker logs my-telegram-proxy-arm64 if you built it).

You Did It!

Congratulations! You’ve successfully set up your own private MTProto proxy for Telegram. This is a fantastic way to ensure you can always access Telegram, no matter what, and with better privacy and control.

Whether your computer is an AMD64 workhorse or a modern ARM64 machine, Docker makes this process surprisingly simple.

If you found this guide helpful, please share it with friends or communities who might be facing Telegram access issues! Happy chatting!

SUMMARY:

JUST run these command on your VPS:

Run docker:

docker run -d --name my-telegram-proxy \
  -p 4434:443 \
  -e SECRET=$(openssl rand -hex 16) \
  telegrammessenger/proxy:latest

Then get the proxy link:

docker logs my-telegram-proxy

There are many free proxies, but with ADS you can try, here’s some of them:

https://telegramlite.com/proxy-for-telegram/country/singapore/sg
https://proxy.delimister.com/

Post Comment