MTProto Layer 225 Compatible • Go 1.25 Engine

The Open-Source Telegram Server
You Actually Control.

Same Telegram experience, but 100% self-hosted. Zero client modifications required — works directly with official Telegram apps, TON Collectible Usernames, and Stars Gifts.

0ms
Client Patching Needed
MTProto 225
Protocol Layer
TON / Fragment
Collectible Usernames
100%
Data Privacy

Built for Performance, Freedom & Privacy

NerfGram bridges the gap between proprietary cloud platforms and self-hosted communication. Take total control over your messages, usernames, and server infrastructure.

Native App Compatibility

Connect using standard official Telegram clients (Android, iOS, Desktop, Web). No custom builds, third-party APKs, or client binary patching required.

✓ Layer 225 MTProto Compliant

TON & Fragment Collectibles

Full server-side engine for issuing, trading, and toggling collectible (NFT-style) usernames, custom verification badges, and Fragment pricing metadata.

✓ Multi-Username Switching

Zero-Leak Privacy

Hardened against phone discovery exploits. Existing account login codes are delivered in-app, protecting your server against phone harvesting.

✓ Enforced Privacy Controls

Blazing-Fast Go Engine

Built from the ground up in Go with PostgreSQL & Redis. Handles tens of thousands of concurrent sessions with single-digit millisecond latency.

✓ Sub-millisecond Execution

Stars Gifts Ecosystem

Complete implementation of Telegram Stars, catalog gifts, limited supply numbers, custom attributes, animations, and upgrade paths to collectibles.

✓ Limited Supply Tracking

Modern Web Admin Control

Dedicated web management panel to monitor nodes, issue gifts & usernames, inspect metrics, and configure environment flags on the fly.

✓ React & Dark Glassmorphism UI

End-to-End Encryption

Support for Secret Chats with Perfect Forward Secrecy (PFS), self-destructing timers, and client-encrypted key exchanges.

✓ End-to-End Cryptography

High-Concurrency Gateway

Multiplexed session protocol with automatic connection pooling and non-blocking Go goroutine worker pools.

✓ 100k+ Active Connections

Automated PostgreSQL Schema

Zero-downtime database schema migrations with transactional rollbacks, index optimization, and Redis PubSub cache synchronization.

✓ Automated DB Migrations

Stars Subscriptions Engine

Complete subscription recurring billing engine for Telegram Stars, auto-renewals, channel access control, and tiered member roles.

✓ Stars Subscriptions

Multi-DC Failover Routing

Automatic multi-datacenter handshake routing, geographic fallback nodes, and seamless session migration during regional outages.

✓ High-Availability Routing

Custom Bot API Relay

Embedded HTTP Bot API gateway supporting webhooks, inline queries, custom keyboards, and payment provider integrations.

✓ Native Bot API Support

Real-Time Security Audit

Structured JSON event logging for administrative actions, authentication attempts, session revocations, and IP anomaly detection.

✓ Comprehensive Audit Trail

Distributed Media CDN

Chunked streaming media engine with range requests, S3 object storage compatibility, and instant parallel file chunk downloads.

✓ S3 Compatible Media Engine

How NerfGram Compares

See why self-hosting with NerfGram provides unmatched freedom and technical capability.

Capability / ArchitectureNerfGram ServerOfficial Telegram CloudGeneric Upstream Forks
100% Self-Hosted Infrastructure✓ Complete Freedom✗ Proprietary Cloud✓ Self-Hosted
Zero Client Code Modifications✓ Direct Connection✓ Direct Connection✗ Requires Client Patches
TON & Fragment Collectible Usernames✓ Full Server Engine✓ Fragment-Only✗ Unimplemented / Broken
In-App Hardened Auth Code Delivery✓ Zero Phone Harvest✓ In-App / SMS✗ Static Code Security Leak
Stars & Unique Gifts Catalog System✓ Built-In Engine✓ Paid Cloud Stars✗ Missing

Launch Your Node in Minutes

bash — nerfgram-deploy.sh
$ git clone https://github.com/kernelfoxx/NerfGram-server.git
$ cd NerfGram-server && cp .env.example .env
$ cd deploy && docker compose up -d && cd ..
$ go build -o bin/gramsrv ./cmd/telesrv
$ ./bin/gramsrv

Frequently Asked Questions

Do I need a modified Telegram application?

No. NerfGram is 100% wire-compatible with MTProto Layer 225. You can point standard Telegram Desktop, Android, or iOS applications directly to your server IP/domain without any binary modifications.

How do Collectible Usernames work on NerfGram?

Admins can issue collectible usernames to users. Users can switch between their primary username and collectible username seamlessly using standard client UI toggles via account.toggleUsername.

Is NerfGram free and open source?

Yes, NerfGram is licensed under open-source terms and maintained by the community for self-hosters and privacy advocates worldwide.

What hardware resources are required?

NerfGram runs extremely lightweight on PostgreSQL and Redis. A basic 1 vCPU, 2GB RAM Linux VPS is more than enough to handle small-to-medium server deployments.