MongooseIM is Erlang Solutions' robust and efficient XMPP server aimed at large installations. Specifically designed for enterprise purposes, it is fault-tolerant, can utilize resources of multiple clustered machines and easily scale in need of more capacity (by just adding a box/VM).
MongooseIM can accept client sessions over vanilla XMPP, Websockets, and HTTP long-polling (a.k.a. BOSH).
Its home on GitHub is at http://github.com/esl/MongooseIM.
The product page is available at https://www.erlang-solutions.com/products/mongooseim.html
For a quick start just download the pre-built package that suits your platform: Ubuntu, Debian, CentOS, and Mac OS X.
An experimental Docker image exists on: https://registry.hub.docker.com/u/mongooseim/mongooseim-docker/ You can contribute on: https://github.com/ppikula/mongooseim-docker
Main differences from the parent project
This project began its life as a fork of ejabberd v.2.1.8 and later underwent some major cleanup, refactorization and optimization.
Major steps performed:
- bringing the project source tree to compliance with OTP project structure recommendations,
autotoolsfor the Erlang community-standard build tool
- removal of obsolete and/or rarely used modules to reduce maintenance burden,
- reduction of runtime memory consumption by refactoring the code to use Erlang's binary data type for string manipulation and storage instead of operating on linked lists of characters,
- functional test coverage of the system according to corresponding RFCs and XEPs.
Up-to-date documentation for the MongooseIM master branch can be found on ReadTheDocs:
- Older versions:
When developing new features/modules, please take care to add basic documentation
doc/ directory, and add a link to your document in
Original documentation for Ejabberd-2.1.8, from which MongooseIM was forked, is preserved
Features and supported standards
- XMPP Core: RFC 3920, RFC 6120
- Client connections over TCP (with TLS/STARTTLS available), Websockets, and HTTP(S) (BOSH).
- Configurable database backends: MySQL, Postgres, generic ODBC. Mnesia and Redis for transient data.
- Supports XEPs:
How to build
To compile MongooseIM you need:
- GNU Make,
- Libexpat 1.95 or higher,
- Erlang/OTP R16B03-1 or higher,
- Reltool 0.6.4.1 or higher,
- OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption,
- Zlib 1.2.3 or higher for Stream Compression support (XEP-0138). Optional.
Compiling on UNIX-like systems.
To compile MongooseIM, go to the main repo directory
$REPOand execute the command (
$stands for the shell prompt):
$ ./rebar get-deps $ ./rebar compile
To generate full MongooseIM release (with mysql, pgsql or other deps):
$ make rel
$ ./rebar generate
If more advanced release is required (with some specifyc db support only, f.e. mysql or pgsql) a
make configurescript with appropirate option(s) can be run before
make configurewithout any option will print following help message.
specifies which 3rd party deps will be included in release possible options: with-mysql include mysql driver with-pgsql include pgsql driver with-odbc include standard ODBC driver shipped with Erlang/OTP with-redis include redis driver with-riak include riak driver with-cassandra include cassandra driver full include all above deps
For example if mysql and redis support has to be added to the release, following command has to be run before
$ make configure with-mysql with-redis
make configurecommand has to be run only once (unless one need to change the relase config and include some other dependecies).
Take a look here for instructions how to setup the external databases.
./rebar generatecommands will generate a self-contained OTP system image in the project's
rel/mongooseimsubdirectory. The contents of that directory are as follows:
rel/mongooseim/bin- startup/administration scripts,
rel/mongooseim/etc- configuration files,
rel/mongooseim/lib- MongooseIM binary, header and runtime files,
rel/mongooseim/var- spool directory,
rel/mongooseim/log- log file directory,
rel/mongooseim/releases- release files directory.
To run MongooseIM from the project tree after compiling it, change to
There you can use the
mongooseimcommand line administration script to start and stop MongooseIM. For example:
$ bin/mongooseim start
will start the server.
You can also run the server in interactive mode:
$ bin/mongooseim live
There's also a tool called
mongooseimctlallowing you to perform some operations on a running instance, e.g.:
$ bin/mongooseimctl status The node mongooseim@localhost is started with status: started MongooseIM version 1.3.1 is running on that node
Building the testing target and running tests.
For testing purposes there's a different make target available:
$ make devrel
which will generate releases in
$REPO/dev/and prepare them for testing and generating coverage reports.
To run the tests (from project's root directory, i.e.
$ cd test $ make quicktest
The test results will show up in the console`.
In order to test and validate your XMPP servers, here are useful tools:
Continuous integration: https://travis-ci.org/esl/MongooseIM
Code coverage: https://coveralls.io/github/esl/MongooseIM
Want to get in touch with us?
In case of any suggestions, questions or any thoughts on this project, please feel free to contact us by the standard GitHub ways or at email@example.com.
Want to discuss MongooseIM, problems with your deployement or anything else? Try: https://erlangcentral.org/forum/mongooseim/.
We have set up a new public mailing-list for all announcements of major events happening on the MongooseIM front. Expect one or two emails per month, the archives are free and open. We highly encourage you to subscribe here: https://groups.google.com/d/forum/mongooseim-announce Click on the blue button "Join group", then click in "Email delivery preference" on "Notify me for every new message".
We recommend following client libraries: