teamgram/teamgram-server

Unofficial open source mtproto server written in golang with compatible telegram client.

Go

2,276

1,357 commits

updated Aug 4, 2026

See the code

README

Teamgram Server

中文 | English


Unofficial open-source MTProto server implementation in Go. Compatible with Telegram clients; supports self-hosted deployment.

Features

  • MTProto 2.0
    • Abridged
    • Intermediate
    • Padded intermediate
    • Full
  • API Layer: 228
  • Core features
    • private chat
    • basic group
    • contacts
    • web

Architecture

Architecture

Prerequisites

ComponentPurpose
MySQL 5.7+ / 8.0Primary data store
RedisCache, session, deduplication
etcdService discovery & config
KafkaMessage & event pipeline
MinIOObject storage
FFmpegMedia transcoding (on server)

Detailed versions and optional monitoring stack: Dependencies and runtime (specs).


Manual installation

For running the server from source (Go build), follow the step-by-step guides:

Requires Go 1.21+. You must install and configure dependencies (MySQL, Redis, etcd, Kafka, MinIO, FFmpeg), initialize the database and MinIO, then build and run.


Docker installation

For running the full stack with Docker. No manual data initialization: the dependency stack initializes the database (via mounted SQL) and MinIO buckets (via minio-mc) on first start.

1. Clone

git clone https://github.com/teamgram/teamgram-server.git
cd teamgram-server

2. Start dependency stack

This starts MySQL, Redis, etcd, Kafka, MinIO (and optional monitoring). The database and MinIO buckets are initialized automatically.

docker compose -f docker-compose-env.yaml up -d

3. Start application

docker compose up -d

Logging, monitoring & tracing

AreaBriefDetailed docs
LogFilebeat → Kafka (teamgram-log) → go-stash → Elasticsearch → Kibana. Config: teamgramd/deploy/filebeat/conf/filebeat.yml, teamgramd/deploy/go-stash/etc/.Log collection (中文)
MonitorPrometheus scrapes metrics; Grafana for dashboards. Enable via Prometheus block in teamgramd/etc2/*.yaml. Config: teamgramd/deploy/prometheus/server/prometheus.yml.Service monitoring (中文)
Tracinggo-zero Jaeger / Zipkin support. Set Telemetry in teamgramd/etc2/*.yaml. Jaeger is included in docker-compose-env.yaml.Link tracking (中文)

Compatible clients

Default sign-in verification code: 12345 (change for production.)


Documentation


Community & feedback


Enterprise edition

The following are available in the enterprise edition (contact the author):

  • sticker/theme/chat_theme/wallpaper/reactions/secretchat/2fa/sms/push(apns/web/fcm)/web/scheduled/autodelete/...
  • channels/megagroups
  • audio/video/group/conferenceCall
  • bots
  • miniapp

See specs/roadmap.md for community vs. enterprise scope.


License

Apache License 2.0.


Give a Star! ⭐

If this project helps you, consider giving it a star.

chat
go
golang
im
im-server
messaging
messenger
mtproto
mtproto-server
telegram
telegram-server

teamgram/teamgram-server

Unofficial open source mtproto server written in golang with compatible telegram client.

Go

2,276

1,357 commits

updated Aug 4, 2026

See the code

README

Teamgram Server

中文 | English


Unofficial open-source MTProto server implementation in Go. Compatible with Telegram clients; supports self-hosted deployment.

Features

  • MTProto 2.0
    • Abridged
    • Intermediate
    • Padded intermediate
    • Full
  • API Layer: 228
  • Core features
    • private chat
    • basic group
    • contacts
    • web

Architecture

Architecture

Prerequisites

ComponentPurpose
MySQL 5.7+ / 8.0Primary data store
RedisCache, session, deduplication
etcdService discovery & config
KafkaMessage & event pipeline
MinIOObject storage
FFmpegMedia transcoding (on server)

Detailed versions and optional monitoring stack: Dependencies and runtime (specs).


Manual installation

For running the server from source (Go build), follow the step-by-step guides:

Requires Go 1.21+. You must install and configure dependencies (MySQL, Redis, etcd, Kafka, MinIO, FFmpeg), initialize the database and MinIO, then build and run.


Docker installation

For running the full stack with Docker. No manual data initialization: the dependency stack initializes the database (via mounted SQL) and MinIO buckets (via minio-mc) on first start.

1. Clone

git clone https://github.com/teamgram/teamgram-server.git
cd teamgram-server

2. Start dependency stack

This starts MySQL, Redis, etcd, Kafka, MinIO (and optional monitoring). The database and MinIO buckets are initialized automatically.

docker compose -f docker-compose-env.yaml up -d

3. Start application

docker compose up -d

Logging, monitoring & tracing

AreaBriefDetailed docs
LogFilebeat → Kafka (teamgram-log) → go-stash → Elasticsearch → Kibana. Config: teamgramd/deploy/filebeat/conf/filebeat.yml, teamgramd/deploy/go-stash/etc/.Log collection (中文)
MonitorPrometheus scrapes metrics; Grafana for dashboards. Enable via Prometheus block in teamgramd/etc2/*.yaml. Config: teamgramd/deploy/prometheus/server/prometheus.yml.Service monitoring (中文)
Tracinggo-zero Jaeger / Zipkin support. Set Telemetry in teamgramd/etc2/*.yaml. Jaeger is included in docker-compose-env.yaml.Link tracking (中文)

Compatible clients

Default sign-in verification code: 12345 (change for production.)


Documentation


Community & feedback


Enterprise edition

The following are available in the enterprise edition (contact the author):

  • sticker/theme/chat_theme/wallpaper/reactions/secretchat/2fa/sms/push(apns/web/fcm)/web/scheduled/autodelete/...
  • channels/megagroups
  • audio/video/group/conferenceCall
  • bots
  • miniapp

See specs/roadmap.md for community vs. enterprise scope.


License

Apache License 2.0.


Give a Star! ⭐

If this project helps you, consider giving it a star.

chat
go
golang
im
im-server
messaging
messenger
mtproto
mtproto-server
telegram
telegram-server

Project health

Latest release

v0.96.0 · Jul 28, 2023

Releases this year

0

Significant stargazers

felipe stival

152 followers · starred Jul 2019

Alexander Marshalov

54 followers · starred Dec 2022

yjqg6666

27 followers · starred Sep 2022

mmis1000

89 followers · starred Oct 2021