Overview
Discover what makes MongooseIM powerful
MongooseIM is a high‑performance, fault‑tolerant XMPP server written in **Erlang/OTP** that serves as the backbone of an enterprise‑grade instant messaging platform. It implements the full XMPP core protocol stack, plus extensions such as PubSub, MUC, and BOSH, while also exposing a modern **REST** and **SSE** interface for non‑XMPP clients. The server is designed to run in a clustered environment, automatically balancing load across nodes and providing seamless failover for user sessions. Its modular architecture allows developers to drop in custom modules or replace built‑in components without recompiling the core.
Multi‑protocol support
Clustered operation
Extensible plugin system
Metrics & monitoring
Overview
MongooseIM is a high‑performance, fault‑tolerant XMPP server written in Erlang/OTP that serves as the backbone of an enterprise‑grade instant messaging platform. It implements the full XMPP core protocol stack, plus extensions such as PubSub, MUC, and BOSH, while also exposing a modern REST and SSE interface for non‑XMPP clients. The server is designed to run in a clustered environment, automatically balancing load across nodes and providing seamless failover for user sessions. Its modular architecture allows developers to drop in custom modules or replace built‑in components without recompiling the core.
Key Features
- Multi‑protocol support – Native XMPP, WebSocket/BOSH over HTTP, REST API, and Server‑Sent Events (SSE) for real‑time notifications.
- Clustered operation – Erlang’s distributed runtime handles node discovery, message routing, and state replication.
- Extensible plugin system –
mongooseimmodules can be added or replaced at runtime; the platform ships with a rich set of ready‑to‑use plugins for presence, message archiving, and authentication backends. - Metrics & monitoring – Built‑in Prometheus exporters, a lightweight web UI, and an integration point for external monitoring tools.
- Load testing & CI – The project ships a comprehensive test suite, load‑testing harness, and continuous integration pipelines (GitHub Actions & CircleCI) to ensure reliability under production workloads.
Technical Stack
| Layer | Technology |
|---|---|
| Runtime | Erlang/OTP 25+ (BEAM VM) |
| Core Protocols | XMPP RFCs, BOSH, WebSocket, REST (JSON), SSE |
| Persistence | Optional: Mnesia (local), PostgreSQL, MongoDB, or custom adapters via mongooseim modules |
| Authentication | LDAP, OAuth2, JWT, RADIUS, or custom auth modules |
| Deployment | Docker images, Helm charts for Kubernetes, native packages (Debian/RedHat) |
| Testing | Erlang eunit, common_test, external load tools, CI pipelines |
| Monitoring | Prometheus metrics, Grafana dashboards, optional ELK stack integration |
MongooseIM’s core is a collection of OTP applications (mongooseim, mod_* plugins, and shared utilities). Each plugin exposes a simple OTP behaviour (gen_server, gen_fsm) that can be swapped or extended by developers, enabling custom routing logic, message transformations, or integration with external services (e.g., a Kafka event bus).
Core Capabilities & APIs
- Session Management –
mongooseim:register_user/3,mongooseim:login/2expose a programmatic API for account creation and authentication. - Message Routing – Developers can hook into the
mod_messagepipeline to implement custom filtering, moderation, or content‑based routing. - Presence & MUC – Built‑in Multi‑User Chat rooms and presence subscriptions can be customized via configuration or plugin code.
- REST & Webhooks – Exposes CRUD endpoints for users, groups, and messages; supports webhook callbacks on events such as message delivery or presence changes.
- Admin API – A lightweight JSON‑over‑HTTP admin interface allows runtime configuration changes, node health checks, and cluster topology queries.
Deployment & Infrastructure
- Self‑hosting – MongooseIM runs on any Linux distribution that supports Erlang. The Docker image is pre‑configured with default clustering, making it trivial to spin up a multi‑node cluster.
- Scalability – Horizontal scaling is achieved by adding nodes to the cluster; Erlang’s distributed messaging automatically routes packets. The platform can handle millions of concurrent users with minimal per‑node overhead (~200 MB RAM).
- Containerization – The official Docker image supports sidecar patterns (e.g., Prometheus exporter, log shipper). Helm charts provide all‑in‑one Kubernetes manifests with customizable resource limits and persistent volumes.
- High Availability – Mnesia replication or external databases ensure session persistence across node failures; the BOSH/WebSocket fallback guarantees client reconnection without manual intervention.
Integration & Extensibility
- Plugin Ecosystem – Any OTP module that implements the expected behaviour can be dropped into
modsdirectory. Examples include custom authentication (mod_auth_ldap,mod_auth_jwt) and message processing (mod_filter_spam). - Webhooks & Callbacks – Developers can register callback functions for events such as
on_message,on_presence, enabling real‑time integrations with analytics or notification services. - External APIs – The REST interface can be consumed by web frontends, mobile SDKs, or third‑party bots.
- Custom Protocols – The modular design allows adding new transport adapters (e.g., MQTT, AMQP) via OTP behaviours without touching the core.
Developer Experience
- Documentation – The official docs (esl.github.io/MongooseDocs) cover installation, configuration, API references, and advanced topics. The guide includes a detailed testing section that demonstrates how to write
common_testsuites against the running server. - Community & Support – Active GitHub repository, open‑source contributions, and commercial support from Erlang Solutions.
- Configuration – A declarative
configfile (YAML/JSON) lets developers enable or disable plugins, set database backends, and tune cluster parameters. - Testing – Built‑
Open SourceReady to get started?
Join the community and start self-hosting MongooseIM today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Tags
Explore More Apps
Ansible-NAS
Automated Docker stack for self‑hosted home servers
Kener
Stunning self‑hosted status pages in Docker
Bubo Reader
Minimalist RSS feed aggregator for self‑hosted sites
Overleaf
Collaborative real‑time LaTeX editing for researchers
Frappe Helpdesk
Open-Source Ticket Management for Seamless Customer Support
CUPS
Open-source, standards‑based printing system for Unix-like OS