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:
- Built from the latest sources from Telegram's GitHub repository
- Automatic configuration updates daily at 3 AM
- Support for random padding to avoid detection
- Simple configuration via environment variables
- Integrated healthcheck
head -c 16 /dev/urandom | xxd -psdocker run -d \
--name mtproxy \
--restart unless-stopped \
-p 443:443 \
-e SECRET=your_generated_secret \
-v ./mtproxy-data:/data \
jahus/mtproxy:latestCreate 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:/dataCreate 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_mtproxybotRun:
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/statsdocker-compose logs -fThe image includes a healthcheck that automatically verifies the proxy is running:
docker inspect --format='{{json .State.Health}}' mtproxyTelegram 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.logTo force an immediate update:
docker exec mtproxy /usr/local/bin/update-config.sh
docker restart mtproxyenvironment:
- 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 moreIf 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 locallyTo update to the latest version:
docker-compose pull
docker-compose up -dversion: '3.8'
services:
mtproxy:
image: jahus/mtproxy:latest
restart: unless-stopped
ports:
- "443:443"
environment:
- SECRET=abc123def456...
volumes:
- ./data:/dataversion: '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- Report bugs: GitHub Issues
- Discussions: GitHub Discussions
This image is not officially affiliated with Telegram.