Notes about ejabberd

From Kosmos Wiki
Jump to navigation Jump to search



XMPP RFC and XEP support

Official documentation

Download official up-to-date packages

The official Debian/Ubuntu package includes a systemd service: /opt/ejabberd-17.08/bin/ejabberd.service


Include config file: include_config_file: "/etc/ejabberd/additional.yml"

Reload configuration

sudo /opt/ejabberd-17.08/bin/ejabberdctl reload_config


Supported databases: Mnesia (Erlang, default), MySQL, PostgreSQL, etc

Warning from the default config file about Mnesia limitations for MAM

XEP-0313: Message Archive Management

You might want to setup a SQL backend for MAM because the mnesia database is limited to 2GB which might be exceeded on large servers

It is possible to migrate from Mnesia to an SQL database

Shared roster

Doc says "Shared roster groups can be edited only via the Web Admin (” but the command line tool works:

sudo /opt/ejabberd-17.08/bin/ejabberdctl srg_create everyone ubuntu-xenial everyone Everyone everyone
sudo /opt/ejabberd-17.08/bin/ejabberdctl srg_user_add @all@ ubuntu-xenial everyone ubuntu-xenial

Import data from prosody

import_prosody import_dir: Import data from Prosody server. import_dir is typically /var/lib/prosody/. Currently the following data is imported: vcards, accounts, rosters, private data (e.g. conference bookmarks), conferences, offline messages and privacy lists.


YAML configuration: strings must be double quoted because of Erlang internals, so we can't use the default Ruby YAML generator to generate it (it generates strings without quotes unless it's required, per YAML spec)

Multiple hosts, example config

  - ""
  - ""
    domain_certfile: "/opt/ejabberd-17.09/conf/example_org.pem"
    domain_certfile: "/opt/ejabberd-17.09/conf/example_com.pem"
## host_config:
##   "":
##     auth_method: anonymous
##     allow_multiple_connections: false
##     anonymous_protocol: sasl_anon
## To use both anonymous and internal authentication:
## host_config:
##   "":
##     auth_method:
##       - internal
##       - anonymous