An up-to-date MTProto proxy for Telegram, built from official sources with automatic configuration updates.
The official telegrammessenger/proxy image is outdated and no longer maintained. This image:
head -c 16 /dev/urandom | xxd -ps
docker run -d \
--name mtproxy \
--restart unless-stopped \
-p 443:443 \
-e SECRET=your_generated_secret \
-v ./mtproxy-data:/data \
jahus/mtproxy:latest
Create a docker-compose.yml file:
version: '3.8'
services:
mtproxy:
image: jahus/mtproxy:latest
container_name: mtproxy
restart: unless-stopped
ports:
- "443:443"
- "8888:8888"
environment:
- SECRET=${SECRET}
- PROXY_TAG=${PROXY_TAG:-}
- WORKERS=2
- PORT=443
- STATS_PORT=8888
volumes:
- ./data:/data
Create a .env file:
# Generate with: head -c 16 /dev/urandom | xxd -ps
SECRET=your_secret_here
# Tag from @MTProxybot (optional)
# PROXY_TAG=your_tag_from_mtproxybot
Run:
docker-compose up -d
| Variable | Description | Default | Required |
|---|---|---|---|
SECRET | 16-byte secret in hex | - | Yes |
PROXY_TAG | Tag from @MTProxybot | - | No |
WORKERS | Number of workers | 1 | No |
PORT | Client port | 443 | No |
STATS_PORT | Statistics port | 8888 | No |
What is random padding?
It's a technique that adds random data to mask MTProxy traffic patterns and avoid detection by ISPs. Recommended in countries with censorship. Just add dd before your SECRET in the URL you share or use.
Send your host or IP to @MTProxybot on Telegram
You will receive a proxy tag and a link you can share.
curl http://localhost:8888/stats
docker-compose logs -f
The image includes a healthcheck that automatically verifies the proxy is running:
docker inspect --format='{{json .State.Health}}' mtproxy
Telegram configuration (proxy-secret and proxy-multi.conf) is automatically updated daily at 3 AM.
You can check update logs:
docker exec mtproxy cat /data/update.log
To force an immediate update:
docker exec mtproxy /usr/local/bin/update-config.sh
docker restart mtproxy
environment:
- PORT=8443 # Instead of 443
ports:
- "8443:8443"
Don't forget to open the port in your firewall.
For a powerful server with high traffic:
environment:
- WORKERS=4 # or more
If you have connectivity issues:
version: '3.8'
services:
mtproxy:
image: jahus/mtproxy:latest
container_name: mtproxy
restart: unless-stopped
network_mode: host
environment:
- SECRET=${SECRET}
- PROXY_TAG=${PROXY_TAG:-}
- WORKERS=2
- PORT=443
- STATS_PORT=8888
volumes:
- ./data:/data
~/mtproxy/
├── docker-compose.yml
├── .env
└── data/
├── proxy-secret # Telegram config (auto-updated)
├── proxy-multi.conf # Telegram config (auto-updated)
└── update.log # Update logs
By default, port 8888 (stats) is exposed. To limit it to localhost only:
ports:
- "443:443"
- "127.0.0.1:8888:8888" # Accessible only locally
To update to the latest version:
docker-compose pull
docker-compose up -d
version: '3.8'
services:
mtproxy:
image: jahus/mtproxy:latest
restart: unless-stopped
ports:
- "443:443"
environment:
- SECRET=abc123def456...
volumes:
- ./data:/data
version: '3.8'
services:
mtproxy:
image: jahus/mtproxy:latest
restart: unless-stopped
ports:
- "443:443"
- "127.0.0.1:8888:8888"
environment:
- SECRET=abc123def456...
- PROXY_TAG=xyz789...
- WORKERS=8
volumes:
- ./data:/data
deploy:
resources:
limits:
cpus: '4'
memory: 2G
This image is not officially affiliated with Telegram.
Content type
Image
Digest
sha256:ca524c9e3…
Size
190.8 MB
Last updated
9 months ago
docker pull jahus/mtproxy