Jabber setup



XMPP (earlier known as Jabber) stands for Extensible Messaging and Presence Protocol. XMPP is an XML-based open, free-to-use protocol for instant messaging and presence information in near real-time mode. To store user accounts and groups, OpenLDAP server is used, while Ejabberd is used as the XMPP server. The necessary software is included with [Calculate Directory Server] (cds).

LDAP configuration

User accounts and groups are stored with OpenLDAP. First configure the LDAP service according to the manual.

Jabber configuration

To install Jabber, run:

cl-setup jabber
* WARNING: Running this program will modify the configuration files of the Jabber service (Ejabberd). If you want to continue, enter 'yes', else enter 'no': yes 

Enter password for admin@calculate.spb.calculate.ru
New password:
Repeat new password:
* User added to Jabber service
* Added ldif file ...                                                            [ ok ]
* Starting Ejabberd ...                                                          [ ok ]
* Jabber service configured ...                                                 [ ok ]

Once this completed, Jabber will be configured with the default parameters. The host name of the computer will be used as the one hosting Jabber.

To specify additional jabber hosts use the - hosts option.

While setting up the service, enter the password for the admin account.


Each user on the network has a unique identifier, a Jabber ID, or JID . Like the email, a JID address contains the user name and the domain name of the server on which the user is registered, separated by the @ sign. For example, a user registered on example.org will have the following JID address: user@example.org.

To add a Jabber account, use the cl-useradd command.

To add a user nicknamed Guest , guest@example.org, run:

cl-useradd -p -c "Guest" guest jabber
New password:
Repeat new password:
* User added to Jabber service

To add guest@example.org, a user nicknamed Guest and attribute a picture to them, run:

cl-useradd -p -c "Guest" -i pic/guest.png guest jabber


Supported image formats are determined by the functionality of ImageMagick. If you have no ImageMagick installed on your system, only jpeg pictures can be used.

To change the password of a Jabber account, use cl-passwd. For instance, to change the password for guest, run:

cl-passwd guest jabber
New password:
Repeat new password:
* Password of Jabber user modified

To lock a user account, use cl-usermod -L. For instance, to lock guest, run:

cl-usermod -L guest jabber
* User guest of Jabber service locked

To unlock an account, run cl-usermod -U. For instance, to unlock guest, run:

cl-usermod -L guest jabber
* User guest of Jabber service unlocked

To remove an account from Jabber, run cl-userdel. For instance, to remove guest, run:

cl-userdel guest jabber
* User guest of Jabber service removed


A group is a set of JIDs used to send messages to several users at the same time. When connecting to Jabber, the user automatically receives a list of groups and their members. Users without groups have to be added manually to the contact list. A user can only be in one group.

To create a Jabber group, use the cl-groupadd command. For instance, to create a group named "Testing Group", run:

cl-groupadd "Testing Group" jabber
 * Group 'Testing Group' added to Jabber service

To rename an existing Jabber group, use cl-groupmod. For example, to rename 'Testing Group' to 'My Test', run as follows:

cl-groupmod -n 'My Test' 'Testing Group' jabber
 * Group renamed to My Test

To edit a Jabber group, use the cl-groupmod and cl-usermod commands. To add user guest to group 'Guest Group', run cl-usermod as shown below:

cl-usermod -g "Guest Group" guest jabber
* User group modified

To remove user guest from group 'Guest Group', run:

cl-groupmod -d guest "Guest group" jabber
* Users removed from group Guest Group

To add users guest,guest2 to group 'Guest Group', run:

cl-groupmod -a guest,guest2 "Guest group" jabber
* Users added to group Guest Group


If you have several network interfaces on your server, but want it to run on one only, add the following ip directive, "", to the listen section of your /etc/jabber/ejabberd.yml file:


    port: 5223
    module: ejabberd_c2s
    max_stanza_size: 65536
    tls: true
    ip: ""
    certfile: "/etc/jabber/ssl.pem"
    shaper: c2s_shaper
    access: c2s