MCPSERV.CLUB
Tinode

Tinode

Self-Hosted

Decentralized, mobile‑first instant messaging platform

Active(88)
12.8kstars
0views
Updated 15 days ago

Overview

Discover what makes Tinode powerful

Tinode is a self‑hosted instant messaging platform that positions itself as a modern, federated replacement for XMPP. The core of the system is written in **Go (GPL‑3.0)**, providing a lightweight, statically compiled binary that can run on any POSIX‑compatible host or container. Clients are available for Android (Java), iOS (Swift), web (React/TypeScript) and a versatile set of gRPC bindings for C++, C#, Go, Java, Node.js, PHP, Python, Ruby and Objective‑C. The transport layer is flexible: JSON over WebSocket (with long‑polling fallback) or binary Protocol Buffers via gRPC, allowing developers to choose the most efficient channel for their environment.

Backend

Client SDKs

Deployment

Federation

Overview

Tinode is a self‑hosted instant messaging platform that positions itself as a modern, federated replacement for XMPP. The core of the system is written in Go (GPL‑3.0), providing a lightweight, statically compiled binary that can run on any POSIX‑compatible host or container. Clients are available for Android (Java), iOS (Swift), web (React/TypeScript) and a versatile set of gRPC bindings for C++, C#, Go, Java, Node.js, PHP, Python, Ruby and Objective‑C. The transport layer is flexible: JSON over WebSocket (with long‑polling fallback) or binary Protocol Buffers via gRPC, allowing developers to choose the most efficient channel for their environment.

Technical Stack & Architecture

  • Backend – Pure Go service exposing a REST‑style JSON API and a gRPC interface. The server uses PostgreSQL for durable storage of users, messages and metadata; an optional in‑memory cache (e.g., Redis) can be wired for high‑throughput scenarios. The Go runtime’s goroutines and channels naturally support the real‑time push model required for instant messaging.
  • Client SDKs – The JavaScript bindings (tinode-js) expose a typed API that mirrors the server’s gRPC contract, enabling developers to embed chat functionality in web or Electron apps. Native clients follow platform conventions (Android Activity‑based UI, SwiftUI for iOS) while still communicating over the same wire protocol.
  • Deployment – The project ships a Docker image (tinode/chat) with optional docker-compose definitions for quick bootstrap. The configuration file (tinode.conf) is fully declarative, allowing TLS termination, database credentials, rate‑limiting and federation settings to be overridden via environment variables.

Core Capabilities

  • Federation – Tinode implements a lightweight protocol for exchanging messages across independent instances, mirroring XMPP’s federation intent but with simpler discovery and fewer edge cases. Developers can expose their instance as a public relay or keep it private.
  • Presence & Typing – Real‑time presence updates and typing notifications are first‑class features, delivered over the same WebSocket channel without extra polling.
  • Chatbots & Scripts – The server can spawn sandboxed Go routines that act as bots, responding to user messages or running scheduled tasks. A CLI client (tinode-cli) allows scripting with jq‑style filters for automation.
  • Rich Media – File uploads are handled via multipart/form-data or gRPC streaming, with optional integration to external storage backends (S3, MinIO) through a pluggable provider interface.
  • Extensibility – The server exposes HTTP hooks and WebSocket callbacks that can be wired to external services (e.g., Slack, Discord) or custom analytics pipelines.

Deployment & Infrastructure

  • Containerization – The official Docker image is minimal (≈ 70 MB) and ready for Kubernetes, ECS or plain Docker. Helm charts are available in the community repo for automated cluster provisioning.
  • Scalability – Horizontal scaling is achieved by running multiple stateless backend instances behind a load balancer; PostgreSQL handles the stateful persistence. For high‑volume deployments, a dedicated Redis cache can be added to offload read traffic.
  • Self‑Hosting Requirements – A single CPU core and 1 GB RAM are sufficient for low‑traffic use. Production setups recommend at least 4 cores, 8 GB RAM and SSD storage for the database. TLS termination can be handled by an external reverse proxy (NGINX, Traefik) or via the built‑in HTTP/HTTPS listener.

Integration & Extensibility

  • Plugin System – Custom Go plugins can be compiled into the binary or loaded at runtime via a simple plugin API, allowing developers to add new message types or authentication backends without touching the core.
  • Webhooks – Outgoing events (message received, user joined) can be posted to arbitrary HTTP endpoints, facilitating integration with monitoring or notification services.
  • SDK Customization – Client libraries expose hooks for custom transport layers, enabling developers to replace WebSocket with MQTT or embed the client in a headless service.

Developer Experience

  • Documentation – The API docs (docs/API.md) provide comprehensive method signatures, request/response schemas and example payloads. The FAQ and troubleshooting guides cover common pitfalls.
  • Community – A Google Group, issue tracker, and Slack channel provide responsive support. The codebase follows idiomatic Go conventions, making it approachable for seasoned backend engineers.
  • Licensing – The server’s GPL‑3.0 license ensures freedom to modify and redistribute, while client SDKs under Apache‑2.0 allow commercial use without copyleft constraints.

Use Cases

ScenarioWhy Tinode?
Enterprise chatSelf‑hosted, GDPR‑compliant, federated to external partners.
IoT command channelLightweight Go server with gRPC, low latency for device control.
Custom chatbot platformBuilt‑in bot support and extensible plugin system.
Secure messaging for NGOsDecentralized federation reduces single points of failure and censorship.
Developer playgroundRapid prototyping with Docker, SDKs in multiple languages.

Advantages Over Alternatives

  • Performance – Go’s compiled nature and efficient concurrency yield low CPU overhead compared to JVM‑based XMPP servers.
  • Simplicity – A single binary with optional Docker support eliminates the need for a complex XMPP stack (C2S, MAM, PubSub).

Open SourceReady to get started?

Join the community and start self-hosting Tinode today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
apis-services
License
GPL-3.0
Stars
12.8k
Technical Specs
Pricing
Open Source
Docker
Dockerfile
Supported OS
LinuxDocker
Author
tinode
tinode
Last Updated
15 days ago