ServersJabbering Up a Storm Page 2

Jabbering Up a Storm Page 2

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Getting Started With Jabberd 2

Jabberd 2 is fairly easy to set up and maintain, but Jabberd 2 binary distributions aren’t common, so this article will run through a source install on a Linux server. First install the following programs. If you install them from packages, be sure to also fetch their associated dev or devel packages:

  • OpenSSL version 0.9.6b or higher
  • Berkeley DB version 4.1.24 or higher
  • Libidn version 0.3.0 or higher

You may also elect to use MySQL or PostgreSQL for your data store. This article shows how to use the Berkeley DB for the data store because it is the simplest, and it works fine for small private servers with a few users. For larger numbers of users and better security you’ll want MySQL or PostgreSQL.

Set Up

Task No. 1 is creating a “jabber” user and group:

 # groupadd jabber
# useradd -g jabber jabber

Jabberd 2 needs its own logfile and file to store PIDs (process identifiers.) If you don’t create a separate logfile, it will dump everything into the syslog.

# mkdir -p /usr/local/var/jabberd/pid/
# chown -R jabber:jabber /usr/local/var/jabberd/pid/
# mkdir -p /usr/local/var/jabberd/log/
# chown -R jabber:jabber /usr/local/var/jabberd/log

Unpack, Configure, And Install

The default installation directory is /usr/local. This can be changed with the usual ./configure options; run ./configure –help to see them. Then do the usual download, unpack, configure, make, and make install procedure. In this example, the configuration options put Jabberd’s configuration files in /etc/jabberd, enable Libidn, OpenSSL, Berkeley DB, and disable MySQL support:

$ tar zxvf jabberd-2.0s6.tar.gz
$ cd jabberd-2.0s6
$ ./configure --sysconfdir=/etc/jabberd --enable-idn --enable-ssl enable-db --disable-mysql
$ make
# make install

Now, change ownership and permissions on /etc/jabberd/. These files contain passwords, so they should be set as writable only by root, and readable only by members of the jabber group:

# chown root:jabber /etc/jabberd/
# chmod -R 640 /etc/jabberd/


The server hostname must be set in both /etc/jabberd/c2s.xml and /etc/jabberd/sm.xml. (Name resolution should also be working.) You can get away with using just the hostname for only LAN use; for remote access, the fully-qualified domain name is necessary. A plain old static, routable IP will work as well. In c2s.xml look for:


In sm.xml, look for the ID line under .

Next, create the /usr/local/var/jabberd/db directory to hold the Berkeley DB data store, and chown it to the jabber user and group. Then edit two entries in c2s.xml. First:


For the second, verify the filepath to the database store is correct:


Testing the Server

And now, the moment of truth. Fire it up and connect with the Jabber-capable IM client of your choice:

jabber@windbag:~# /usr/local/bin/jabberd

Your account name is What clients are supported? Literally hundreds for Linux, Windows, MacOS, and other platforms. See Jabber :: Software :: Clients for a complete list.

Public registration is enabled by default, so anyone who knows your server address can register an account. For LAN use, or for a few selected remote users, you can set up simple network access controls in c2s.xml. For example, this restricts access to a single local subnet only, plus a single remote IP:


Managing Users

There are no tools for adding or removing users from the Berkeley DB data store. If you wish to disable public registration, control user access, and have the ability to add and delete users, use MySQL or PostgreSQL. There are no Jabberd 2 tools for removing or adding users, you’ll use the standard MySQL/Postgre tools. See the Jabberd 2 Installation and Administration Guide for instructions on using these.

>> More Jabber Options

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories