Introduction
ejabberd is a battle-tested XMPP server built on Erlang/OTP, known for its ability to handle millions of concurrent connections with high availability. It has been in active development since 2002 and is used by large-scale messaging deployments, telecom operators, and IoT platforms.
What ejabberd Does
- Implements the full XMPP protocol suite for instant messaging, presence, and group chat
- Supports clustering across multiple nodes for horizontal scaling and fault tolerance
- Provides an MQTT broker for IoT device communication alongside XMPP
- Includes a built-in web administration panel and a comprehensive REST API
- Handles server-to-server (S2S) federation for inter-domain communication
Architecture Overview
ejabberd is built on the Erlang/OTP platform, leveraging lightweight Erlang processes for each client connection. The router dispatches stanzas between local users, remote servers (S2S), and components. Mnesia serves as the default in-memory clustered database for session state and routing tables, while SQL backends (PostgreSQL, MySQL) store persistent data like user accounts, rosters, and message archives. The modular architecture allows enabling or disabling features (MUC, PubSub, MAM, Push) via configuration.
Self-Hosting & Configuration
- Deploy via Docker, native packages for Linux/macOS/Windows, or compile from source
- Edit ejabberd.yml to configure virtual hosts, authentication, and enabled modules
- Enable SQL storage by pointing the sql_type and sql_server settings to PostgreSQL or MySQL
- Set up clustering by joining new nodes to an existing cluster with ejabberdctl
- Configure Let's Encrypt certificates with the built-in ACME client
Key Features
- Erlang/OTP hot code upgrades allow patching without disconnecting users
- Multi-protocol support: XMPP, MQTT 5.0, SIP, and STUN/TURN for voice and video
- Message Archive Management (MAM) for server-side message history
- Push notifications via XMPP Push (XEP-0357) for mobile clients
- LDAP and external authentication module support for enterprise identity integration
Comparison with Similar Tools
- Prosody — lightweight Lua XMPP server for smaller deployments; ejabberd targets high concurrency with Erlang
- Openfire — Java-based XMPP server with plugin ecosystem; ejabberd offers native clustering and higher throughput
- Matrix/Synapse — federated chat with a different protocol; ejabberd uses the XMPP standard with broader client support
- Mosquitto — lightweight MQTT broker; ejabberd combines XMPP and MQTT in a single server
FAQ
Q: How many users can a single ejabberd node handle? A: A single node can handle hundreds of thousands of concurrent connections. Clustering scales linearly to millions.
Q: Does it support end-to-end encryption? A: ejabberd transports OMEMO and OTR encrypted messages. The encryption happens on the client side; the server relays encrypted payloads without decrypting them.
Q: Can I use it as an MQTT broker? A: Yes. ejabberd includes a built-in MQTT 5.0 broker that shares the same clustering and authentication infrastructure as XMPP.
Q: Is there a managed cloud offering? A: ProcessOne offers ejabberd Business Edition and a hosted SaaS. The open-source Community Edition is fully self-hosted.