Self-Hosting MTProto: Pre-Launch Checklist
Before launching your own MTProto proxy server, work through this 12-item checklist.
Why a checklist
Self-hosting an MTProto proxy is technically simple but operationally finicky. Many self-hosted proxies are unreliable because the operator missed one or two basic checks. This checklist captures the critical items.
1. Server location
Pick a country with no Telegram restrictions and good peering to your target users. Germany, Netherlands, Singapore, Japan are typical choices. Avoid countries that block Telegram (your proxy will be slower than direct).
Get a free TGFast proxy
Browse the live country grid on the home page and tap any card to connect Telegram in one second — no signup, no logs.
Open the fleet2. Provider reputation
Use a reputable VPS provider that does not block proxy/VPN-style use. Hetzner, OVH, Vultr, DigitalOcean and Linode all permit MTProto proxies in their terms. Avoid providers with strict acceptable use policies (some "premium gaming" hosts block any proxy use).
3. Resource allocation
1 vCPU, 1 GB RAM, 1 TB monthly bandwidth handles 50-100 active users. Scale linearly: 200 users = 2 vCPU + 2 TB bandwidth. Most starter VPS plans ($3-5/month) are sufficient.
Stay updated
Join @FastTGProxyMT for instant alerts when servers move or new proxies launch.
Join Telegram Channel4. Software choice
Use mtg (https://github.com/9seconds/mtg) for new deployments — it is actively maintained, supports "ee" obfuscation and has good performance.
5. Port choice
Use a high random port (30000-60000). Avoid 80, 443, 8080. Document your choice for users.
6. Secret generation
Generate the secret on the server itself using mtg's built-in command. Do not reuse a secret across multiple servers — each server should have a unique secret to limit blast radius.
7. Firewall rules
On the host, allow inbound TCP on your chosen port only. Block everything else. Use ufw or iptables. This minimises attack surface.
8. Process supervision
Run mtg under systemd or Docker with restart=always. The proxy must auto-restart on crashes or it will silently fail.
9. Monitoring
Set up uptime monitoring (UptimeRobot has a free tier). Get alerts when your proxy goes down. A proxy that has been down for 6 hours is essentially useless.
10. Log management
Configure mtg to log only to stderr (no traffic content logging). Use logrotate to keep system logs from filling the disk. Discard access logs after 24 hours.
11. Bandwidth alerts
Set a bandwidth alert at 80% of your monthly cap. Telegram traffic is bursty — a surge of users can blow through your cap unexpectedly.
12. Backup proxy
Run a second proxy on a different provider in a different country. If your primary IP gets blocked, you have a fallback. This is what TGFast does at scale; it works at small scale too.