A minimal, secure, and production-oriented Docker image for Telemt — a fast MTProto proxy server (MTProxy) written in Rust + Tokio.
Built as a fully static binary and shipped in a distroless runtime image, running as non-root by default.
amd64 and arm64.gcr.io/distroless/static:nonroot./etc/telemt.toml and go.9090) via config.Telemt is a Telegram proxy (MTProto). Operating proxies may be restricted or monitored depending on your country/ISP and may carry legal/operational risks.
You are responsible for compliance with local laws and for safe deployment (firewalling, access control, logs, monitoring).
Telemt users require a 32-hex-char secret (16 bytes):
openssl rand -hex 16
telemt.tomlRefer to the upstream repository for the configuration format and examples:
Place your configuration file as ./telemt.toml.
docker-compose.ymlNote: the container runs as non-root, but Telemt binds to 443 by default. To allow binding to privileged ports, we add
NET_BIND_SERVICE.
services:
telemt:
image: uppal/telemt-docker:latest
container_name: telemt
restart: unless-stopped
environment:
RUST_LOG: "info"
volumes:
- ./telemt.toml:/etc/telemt.toml:ro
ports:
- "443:443/tcp"
# If you enable metrics_port=9090 in config:
# - "127.0.0.1:9090:9090/tcp"
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
read_only: true
tmpfs:
- /tmp:rw,nosuid,nodev,noexec,size=16m
deploy:
resources:
limits:
cpus: "0.50"
memory: 256M
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
docker compose up -d
Logs:
docker compose logs -f
| Variable | Mandatory | Default | Description |
|---|---|---|---|
RUST_LOG | No | — | Telemt log level (e.g. info, debug, trace). |
| Container Path | Purpose |
|---|---|
/etc/telemt.toml | Main Telemt configuration file (you mount it from the host). |
| Port | Purpose |
|---|---|
443/tcp | Main MTProxy listener (commonly used for TLS-like traffic). |
9090/tcp | Metrics port (only if enabled in telemt.toml). |
telemt/etc/telemt.tomlSo the container effectively runs:
telemt /etc/telemt.toml
To use a different config path, override the command:
docker run ... uppal/telemt-docker:latest /path/to/config.toml
The stack/ directory contains a production-ready deployment with Traefik as a TLS-passthrough reverse proxy in front of Telemt.
curl -sSL https://raw.githubusercontent.com/uppaljs/telemt-docker/main/stack/install.sh | bash
The installer will:
443) and Fake TLS domain (default 1c.ru)tg://proxy linkgit clone https://github.com/uppaljs/telemt-docker.git
cd telemt-docker/stack
cp telemt.toml.example telemt.toml
# Edit telemt.toml — replace REPLACE_WITH_32_HEX_CHARS with: openssl rand -hex 16
docker compose up -d
stack/
├── docker-compose.yml # Traefik + Telemt services
├── install.sh # One-line installer script
├── telemt.toml.example # Sample Telemt config
└── traefik/
├── dynamic/
│ └── tcp.yml # TLS passthrough routing to Telemt
└── static/
└── .gitkeep
| Variable | Default | Description |
|---|---|---|
LISTEN_PORT | 443 | External port for the proxy |
FAKE_DOMAIN | 1c.ru | Domain for Fake TLS masking |
TELEMT_INTERNAL_PORT | 1234 | Internal Telemt listen port |
INSTALL_DIR | ./mtproxy-data | Where files are downloaded |
This Dockerfile supports pinning upstream Telemt source:
TELEMT_REPO (default: https://github.com/telemt/telemt.git)TELEMT_REF (default: main)docker buildx build \
--platform linux/amd64,linux/arm64 \
-t uppal/telemt-docker:latest \
--push .
docker buildx build \
--build-arg TELEMT_REF=v1.1.0.0 \
-t uppal/telemt-docker:v1.1.0.0 \
--push .
Content type
Image
Digest
sha256:f1386dd02…
Size
5.3 MB
Last updated
5 months ago
docker pull uppal/telemt-docker:318de19