Ejabberd Installation and Operation Guide

Alexey Shchepin
mailto:alexey@sevcom.net
xmpp:aleksey@jabber.ru

January 23, 2003





1   Introduction

ejabberd is a Free and Open Source distributed fault-tolerant Jabber server. It writen mostly in Erlang.

TBD

2   Installation

2.1   Installation Requirements

To compile ejabberd, you need following packages:

2.2   Obtaining

Currently no stable version released.

Latest alpha version can be retrieved via CVS. Do following steps:

2.3   Compilation

3   Configuration

3.1   Initial Configuration

Configuration file is loaded after first start of ejabberd. It consists of sequence of Erlang terms. Parts of lines after `%' sign are ignored. Each term is tuple, where first element is name of option, and other are option values.

3.1.1   Host Name

Option hostname defines name of Jabber domain that ejabberd serves. E. g. to use jabber.org domain add following line in config:
{host, "jabber.org"}.

3.1.2   Listened Sockets

Option listen defines list of listened sockets and what services runned on them. Each element of list is a tuple with following elements: Currently three modules implemented: For example, following configuration defines that C2S connections listened on port 5222, S2S on port 5269 and that service conference.jabber.org must be connected to port 8888 with password ``secret''.

{listen, [{5222, ejabberd_c2s,     start, []},
          {5269, ejabberd_s2s_in,  start, []},
          {8888, ejabberd_service, start, ["conference.jabber.org", "secret"]}
         ]}.

3.1.3   Access Rules

TBD

3.1.4   Modules

Option modules defines list of modules that will be loaded after ejabberd startup. Each list element is a tuple where first element is a name of module and second is list of options to this module. Refer to section 5 for detailed information on each module.

Example:
{modules, [
           {mod_register,  []},
           {mod_roster,    []},
           {mod_configure, []},
           {mod_disco,     []},
           {mod_stats,     []},
           {mod_vcard,     []},
           {mod_offline,   []},
           {mod_echo,      [{host, "echo.e.localhost"}]},
           {mod_private,   []},
           {mod_time,      [{pdisc, no_queue}]},
           {mod_version,   []}
          ]}.

3.2   Online Configuration

To use facility of online reconfiguration of ejabberd needed to have mod_configure loaded (see section 5.4). Also highly recommended to load mod_disco (see section 5.5), because mod_configure highly integrates with it. Also recommended to use disco-capable client.

TBD

4   Distribution

5   Built-in Modules

5.1   Common Options

Following options used by many modules, so they described in separate section.

5.1.1   Option iqdisc

Many modules define handlers for processing IQ queries of different namespaces to this server or to user (e. g. to myjabber.org or to user@myjabber.org). This option defines processing discipline of this queries. Possible values are:
no_queue
All queries of namespace with this processing discipline processed immediately. This also means that no other packets can be processed until finished this. Hence this discipline is not recommended if processing of query can take relative many time.
one_queue
In this case created separate queue for processing IQ queries of namespace with this discipline, and processing of this queue done in parallel with processing of other packets. This discipline is most recommended.
parallel
In this case for all packets of namespace with this discipline spawned separate Erlang process, so all this packets processed in parallel. Although spawning of Erlang process have relative low cost, this can broke server normal work, because Erlang have limit of 32000 processes.
Example:
{modules, [
           ...
           {mod_time,      [{pdisc, no_queue}]},
           ...
          ]}.

5.2   mod_register

5.3   mod_roster

5.4   mod_configure

5.5   mod_disco

5.6   mod_stats

5.7   mod_vcard

5.8   mod_offline

5.9   mod_echo

5.10   mod_private

5.11   mod_time

5.12   mod_version


This document was translated from LATEX by HEVEA.