ejabberd: A Battle-Tested XMPP Server

ejabberd: A Battle-Tested XMPP Server

ejabberd is the XMPP server you choose when scale or clustering matters.

Erlang is why

XMPP is a protocol about many long-lived connections passing small messages, which is precisely what Erlang’s runtime was designed for. ejabberd routinely handles numbers of concurrent sessions that would require careful work in other languages.

It also gets Erlang’s clustering: nodes form a cluster sharing session state, so a user connected to one node can message a user on another, and a node can be removed without dropping the service.

ejabberd or Prosody

The two serious open source XMPP servers, and the distinction is real.

ejabberd is Erlang, clusters natively, has the larger feature surface, and is deployed at telco scale. Configuration is YAML and the operational model is heavier.

Prosody is Lua, single-node, far smaller, and considerably more pleasant to configure and extend for a modest deployment.

For a family or small community server, Prosody is the easier choice. For thousands of users or a requirement that no single node be fatal, ejabberd.

What XMPP gives you

Federation: your server talks to other servers, so users on different domains message each other. That is the same property Matrix offers with a different protocol, and XMPP’s is older, lighter and uses less bandwidth and storage.

The trade is client quality and feature expectations. Modern XMPP needs a stack of extensions, OMEMO for encryption, MAM for history, carbons for multi-device, push for mobile, and client support for them varies. Snikket exists precisely to package Prosody with the right extensions and matched clients.

Operational notes

ejabberdctl status
ejabberdctl registered_users example.com
ejabberdctl connected_users_number

Mnesia for small deployments, PostgreSQL or MySQL for larger, per our PostgreSQL guide.

Also speaks MQTT and has SIP support, which makes it an odd but occasionally useful fit alongside Mosquitto for IoT work.

Operational caution

TLS and federation DNS are where deployments fail. XMPP needs _xmpp-client and _xmpp-server SRV records and valid certificates on both the client and server ports, and federation silently fails without them. Our dig guide covers checking SRV records and our Let’s Encrypt guide covers the certificates.

Spam over federation is real; configure registration restrictions rather than leaving open in-band registration.

License

ejabberd is released under the GNU General Public License v2.