MTProto is Telegram's dedicated cryptographic protocol engineered to provide secure, low-latency, and resilient client-to-server messaging. When standard TCP connections to Telegram servers experience aggressive throttling or packet shaping on congested networks, deploying a private MTProto Proxy on an unmetered Linux VPS improves routing stability and preserves encrypted connectivity.
In this comprehensive engineering guide, we walk through configuring an official MTProto Proxy with **TLS Transport Encapsulation** (EE secret) on **Ubuntu 24.04 LTS**. This standard wrapping wraps proxy handshakes in TLS 1.3 transport headers compatible with modern enterprise firewalls.
Before beginning the installation, ensure your cloud environment meets the following specifications:
Always begin by refreshing your package index and installing necessary toolchains:
Telegram maintains an official C-based proxy daemon optimized for epoll multi-threading on Linux kernels:
Once compilation completes, the binary executable will be located at `/opt/MTProxy/objs/bin/mtproto-proxy`.
The proxy requires the latest Telegram cluster routing table and public authentication secret directly from Telegram servers:
To establish standardized TLS-wrapped proxy transport, we generate a 32-character hexadecimal secret and prefix it with `ee` along with the hex-encoded hostname of an SSL reference domain (for example, `www.cloudflare.com`):
Store this string safely. Your Telegram client will use this exact secret string to establish TLS-masked tunnels.
To ensure your MTProto proxy automatically boots on system restart and restarts in case of network interruptions, build a systemd unit file:
Create `/etc/systemd/system/mtproxy.service`:
Replace `YOUR_RAW_SECRET_HERE` with the 32-character random hex string (without the `ee` and domain suffix) generated in Step 4.
Reload and start the daemon:
Ensure your designated public port (e.g., TCP `443`) is allowed through the Linux firewall:
Your proxy connection link is formatted as:
Clicking this link on iOS, Android, macOS, or Windows will prompt Telegram to add the proxy with 1 tap. Traffic will now stream encrypted through your high-speed cloud instance with ultra-low ping.
Need clean IP addresses, DDoS mitigation, and 10 Gbps uplinks to run your proxies, containers, or Windows servers? Deploy your instance in 60 seconds.