
# JuggleIM
**A high-performance, scalable open-source instant messaging (IM) system.**
[](./LICENSE)
[](https://github.com/juggleim/im-server)
[](https://github.com/juggleim/im-server/actions/workflows/ci.yml)
[](https://github.com/juggleim/im-server/releases)
[](https://github.com/juggleim/im-server/stargazers)
[](https://github.com/juggleim/im-server/network/members)
[](https://github.com/juggleim/im-server/commits)
**[简体中文](./README_zh.md)** | **English**
**[Website](https://www.juggle.im)** ·
**[Docs](https://www.juggle.im/docs/guide/intro/)** ·
**[Quick Deploy](https://www.juggle.im/docs/guide/deploy/quickdeploy/)** ·
**[API Reference](https://www.juggle.im/docs/server/api/)** ·
**[Ask a Question](https://github.com/juggleim/im-server/discussions/categories/q-a)**
If this project helps you, please give it a ⭐ **Star** — it keeps the project easy to find and motivates us to keep building!
---
## 📖 What is JuggleIM
JuggleIM is a **ready-to-use, self-hostable** instant messaging (IM) backend. Built on a Protobuf + WebSocket long-connection protocol, it focuses on efficient message delivery and reliable storage, letting you add chat capabilities to your app, website, or business system in minutes.
Whether you are building a social product, a customer-service system, IoT device communication, live-stream chat, or AI bot conversations, JuggleIM serves as a solid messaging foundation. It is **multi-tenant** by design — a single deployment can host multiple fully isolated applications — and the professional edition scales horizontally to support **hundreds of millions of daily active users**.
> Want to try it right away? Jump to the [Docker Quick Start](#-quick-start-with-docker) below.
## ✨ Key Features
**🚀 High Performance & High Availability**
- Protobuf + WebSocket long connections — low bandwidth, high throughput, and reliable connectivity even on poor networks
- Professional edition supports clustered deployment with unlimited horizontal scaling, powering apps with hundreds of millions of DAU
- Handles large groups of 10,000–100,000 members without losing messages, plus unlimited-size live chat rooms
**🔒 Secure & Reliable**
- Tenant-scoped credentials and token-based client authentication, with HTTPS/WSS recommended for production transport security
- Multi-device online presence and message sync keep state consistent across all endpoints
**🌍 Flexible Deployment & Global Reach**
- Supports public cloud, private cloud, and managed cloud deployment models
- Global link acceleration for worldwide-scale applications
**🧩 Easy to Integrate & Extend**
- SDKs for Android, iOS, Web, PC, Flutter, and HarmonyOS, each with a demo and docs
- Rich REST APIs and WebHooks for integrating with your existing systems
- Built-in AI bot connectivity — easily plug in large language models
- Comes with ops tooling and an admin console for simple maintenance
## 🗂 Table of Contents
- [Ecosystem](#-ecosystem)
- [Architecture](#-architecture)
- [Quick Start with Docker](#-quick-start-with-docker)
- [Manual Deployment](#-manual-deployment)
- [Create an Application (Tenant)](#-create-an-application-tenant)
- [Integration](#-business-server--client-integration)
- [Community](#-community)
- [Star History](#-star-history)
## 🧬 Ecosystem
JuggleIM follows a layered architecture — "core service + business service + multi-platform SDKs + demos" — with clearly separated repositories that can be composed and customized as needed.
| Repository | Description |
| :--- | :--- |
| **[im-server](https://github.com/juggleim/im-server/)** | Core IM service handling message delivery, storage, and related IM logic (this repo) |
| [jugglechat-server](https://github.com/juggleim/jugglechat-server) | Demo business service handling user registration/login, group creation, friends, etc. — a base for your own development |
| [jugglechat-server-java](https://github.com/juggleim/jugglechat-server-java) | Java version of the demo business service |
| [imserver-console](https://github.com/juggleim/imserver-console) | Admin console for IM configuration and business metrics |
| [imsdk-android](https://github.com/juggleim/imsdk-android) | Android imsdk with a UI demo, ready for customization |
| [imsdk-ios](https://github.com/juggleim/imsdk-ios) | iOS imsdk with a UI demo, ready for customization |
| [imsdk-web](https://github.com/juggleim/imsdk-web) | Web imsdk |
| [imsdk-flutter](https://github.com/juggleim/imsdk-flutter) | Flutter version of imsdk |
| [imsdk-harmony](https://github.com/juggleim/imsdk-harmony) | HarmonyOS imsdk with a UI demo, ready for customization |
| [jugglechat-web](https://github.com/juggleim/jugglechat-web) | Web demo integrating imsdk-web, ready for customization |
| [jugglechat-desktop](https://github.com/juggleim/jugglechat-desktop) | Desktop demo integrating imsdk-pc, ready for customization |
| [jugglelive-web](https://github.com/juggleim/jugglelive-web) | Live chat-room demo integrating imsdk-web, ready for customization |
| [bot-connector](https://github.com/juggleim/bot-connector) | Bot connector service bridging im-server and third-party bots |
| [imserver-sdk-go](https://github.com/juggleim/imserver-sdk-go) | SDK wrapping the im-server server-side API for easy integration |
| [imserver-sdk-java](https://github.com/juggleim/imserver-sdk-java) | Java version of imserver-sdk |
> The desktop imsdk-pc is not yet open-sourced — contact support for details.
## 🏗 Architecture
JuggleIM runs as a modular Go service: HTTP and WebSocket gateways route requests through an internal actor/RPC runtime to messaging, identity, conversation, history, push, file, bot, and RTC modules.
[](./docs/architecture.md)
Read the **[architecture guide](./docs/architecture.md)** for component boundaries, data ownership, private and group message flows, security boundaries, and deployment constraints. [简体中文版](./docs/architecture_zh.md)
Evaluate performance with the **[reproducible benchmark harness](./BENCHMARKS.md)**, which reports connection setup separately from private-chat and group-chat ACK and delivery throughput, including P50/P95/P99 latency and machine-readable results.
## 🚀 Quick Start with Docker
Run a complete local JuggleIM stack with MySQL and the admin console:
```bash
git clone https://github.com/juggleim/im-server.git
cd im-server
docker compose up -d
```
Once the containers are healthy, the local services are available at:
| Service | Address | Purpose |
| :--- | :--- | :--- |
| Server API | `http://127.0.0.1:9001` | Called by your business server |
| Navigator | `http://127.0.0.1:9002` | Returns the client connection address |
| WebSocket | `ws://127.0.0.1:9003` | Used by client SDKs for long connections |
| Admin console | `http://127.0.0.1:8090` | Manage applications; default login: `admin` / `123456` |
Create a local application, register two synthetic users, and send a private message with the verified server API example:
```bash
bash examples/server-api-quickstart.sh
```
The script keeps the generated application secret on the server side and prints the two temporary user tokens needed for local SDK testing. See the **[server API quick start](./docs/server-api-quickstart.md)** for the complete flow and security boundaries. [简体中文版](./docs/server-api-quickstart_zh.md)
Stop the local stack with `docker compose down`. To remove its MySQL data as well, use `docker compose down -v`.
If the stack does not become healthy, follow the **[Docker Compose troubleshooting guide](./docs/docker-troubleshooting.md)** for status checks, logs, port conflicts, MySQL health, and safe reset steps. [简体中文版](./docs/docker-troubleshooting_zh.md)
For production, clustering, and managed deployment options, see the **[Deployment Guide](https://www.juggle.im/docs/guide/deploy/quickdeploy/)**.
## 🛠 Manual Deployment