MCPSERV.CLUB
SimpleX Chat

SimpleX Chat

Self-Hosted

Private messaging without identifiers

Active(94)
9.8kstars
0views
Updated 5 days ago
SimpleX Chat screenshot

Overview

Discover what makes SimpleX Chat powerful

SimpleX Chat is a privacy‑first, self‑hosted messaging platform that eliminates user identifiers entirely. From a developer’s standpoint it functions as a lightweight, end‑to‑end encrypted chat server that can be embedded into existing infrastructure or deployed as a standalone service. The core of the system is written in **Go** (Golang), chosen for its compiled performance, concurrency primitives, and cross‑platform binaries. The backend exposes a **RESTful JSON API** for user provisioning, group management, and message routing, while the mobile clients (Android, iOS) consume this API over HTTPS. All data stored on disk is encrypted with a per‑user key derived from the device’s secure enclave, ensuring that even the host cannot read message payloads.

Language & Runtime

Frameworks

Transport

Database

Overview

SimpleX Chat is a privacy‑first, self‑hosted messaging platform that eliminates user identifiers entirely. From a developer’s standpoint it functions as a lightweight, end‑to‑end encrypted chat server that can be embedded into existing infrastructure or deployed as a standalone service. The core of the system is written in Go (Golang), chosen for its compiled performance, concurrency primitives, and cross‑platform binaries. The backend exposes a RESTful JSON API for user provisioning, group management, and message routing, while the mobile clients (Android, iOS) consume this API over HTTPS. All data stored on disk is encrypted with a per‑user key derived from the device’s secure enclave, ensuring that even the host cannot read message payloads.

Architecture

  • Language & Runtime: Go 1.20+, compiled to static binaries for minimal runtime dependencies.
  • Frameworks: Uses the standard net/http library with a custom router; optional integration with Gin or Echo for advanced routing is supported in the community.
  • Transport: HTTPS (TLS 1.3) with mutual authentication for server‑to‑server links; WebSocket support is optional for real‑time push.
  • Database: The default storage engine is SQLite (file‑based) for simplicity, but the architecture abstracts a Storage interface that allows swapping to PostgreSQL, MySQL, or even Redis for session caching.
  • Encryption: Implements the Double Ratchet algorithm (X3DH + XEdDSA) for forward secrecy, with an optional layer of NaCl SecretBox for end‑to‑end protection.
  • Containerization: A Dockerfile is provided; the image can be run with environment variables for database path, TLS certs, and feature flags. Kubernetes manifests are available in the deploy/k8s directory for high‑availability deployments.

Core Capabilities

  • Identifier‑less Messaging: Users are referenced by public keys or short numeric IDs, preventing any linkable identity.
  • Group Chats & Channels: Dynamic group creation with role‑based permissions; groups are stored as encrypted blobs in the database.
  • File Transfer: Supports chunked uploads up to 100 MB, automatically encrypted and signed.
  • Webhooks & Callbacks: Exposes HTTP endpoints for event notifications (new message, user join/leave) that can be consumed by external services.
  • API SDKs: Community maintained Go, Python, and JavaScript clients abstract the raw REST calls, providing helper functions for key exchange and message encryption.
  • Audit & Logging: All API calls are logged with request/response hashes; logs can be shipped to ELK or Loki stacks.

Deployment & Infrastructure

Self‑hosting is straightforward: a single binary, an SQLite file, and TLS certificates. For production, the recommended setup is:

  1. Docker Compose: Spin up the server with a separate PostgreSQL container for persistence and Redis for pub/sub.
  2. Kubernetes: Deploy the StatefulSet with persistent volumes; use a Service Mesh (Istio/Linkerd) for mTLS between pods.
  3. Scalability: The stateless API can be horizontally scaled behind a load balancer; the SQLite backend is replaced with PostgreSQL for multi‑instance setups.
  4. Backup: The database file can be snapshotted; the encryption keys are stored in a secure key‑management system (e.g., HashiCorp Vault).

Integration & Extensibility

  • Plugin System: A simple hook API allows developers to inject custom logic into message processing or user authentication.
  • External Authentication: OAuth2, SAML, or LDAP can be integrated by overriding the AuthProvider interface.
  • Webhooks: Custom HTTP callbacks for message events enable integration with Slack, Discord, or internal monitoring dashboards.
  • Custom UI: The front‑end is a modular React app; developers can replace components or build their own UI consuming the same API.

Developer Experience

  • Documentation: The repo includes comprehensive docs/ with setup guides, API reference, and contribution guidelines. Code comments follow Go conventions.
  • Community: Active GitHub Discussions, a dedicated subreddit, and Mastodon channel provide quick support.
  • Licensing: AGPL‑3.0 ensures that any modifications remain open, encouraging collaboration while protecting privacy.
  • Testing: The test suite covers unit tests for cryptographic primitives and integration tests against a mock server.

Use Cases

  • Secure Internal Chat: Enterprises can deploy SimpleX to provide a private messaging channel without exposing employee identities.
  • Disaster Recovery: NGOs in conflict zones can host a self‑managed server to communicate without relying on third‑party platforms.
  • IoT & Edge Devices: Lightweight binaries make it suitable for embedded devices that need secure, low‑latency messaging.
  • Academic Research: The open source code and clear API make it a reference implementation for privacy‑preserving communication protocols.

Advantages

  • Performance: Go’s concurrency model delivers low latency even under heavy load; the binary is ~30 MB and runs on ARM, x86, or WASM.
  • Flexibility: The storage abstraction and plugin hooks let developers tailor the system to any backend or workflow.
  • Privacy: No user identifiers, end‑to‑end encryption, and optional double ratchet make it a

Open SourceReady to get started?

Join the community and start self-hosting SimpleX Chat 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
AGPL-3.0
Stars
9.8k
Technical Specs
Pricing
Open Source
Supported OS
LinuxmacOSWindows
Author
simplex-chat
simplex-chat
Last Updated
5 days ago