view · edit · print · history

(not yet complete)

Table of contents

  1. The goal of this howto
  2. The current situation
  3. Proceeding with jabberd2

The goal of this howto

The goal of this howto is to set up a Jabber/XMPP (instant messaging) server on an NSLU2 running Debian.

You can use it either as an additional server to the net, or as a local server for your intranet (e.g. in your LAN at home or in a medium sized office).

The current situation

There are quite a lot of different Jabber servers to choose from [1].

But most of them are implemented in a programming language (Java, Erlang, Python, etc.) quite inadequate for the NSLU2.

In Debian there are 3 different Jabber servers at the moment, which are jabber, jabberd2 and ejabberd.

My first try was to install the original jabber server, but unfortunately the Debian package for the arm architecture (which we would require) seems to be broken for quite some time [2].

Next I have tried to set up the ejabberd server, which did even work, but unfortunately way too slow. Even after setting up only 2 accounts to test the setup, messages sometimes required a few seconds to reach their destination (where I have to mention that I also have an encrypted root on the NSLU2). So I doubt the ejabberd will scale on the NSLU2 if there are more than a few users.

So my next alternative was jabberd2, which works quite well at the moment. Therefore I'll describe how to get a simple jabberd2 setup up and running.

Proceeding with jabberd2

I will not specify every configuration step, but rather link to the official installation and configuration guide [3](approve sites) and only mention the steps that differ from the official guide.

There are quite some packages for jabberd2 which differ mostly in which backend is (or can be) used to store user accounts and handle authentication [4]. I've chosen to use Berkeley DB as a backend for both storage and authentication (jabberd2-bdb). Because jabberd2 is still marked experimental, we have to download it from the website ourselves [5].

First we have to install jabber-common, which will e.g. add a jabber user to the system. Then we can install jabberd2-bdb via dpkg.

# apt-get install jabber-common
# dpkg -i jabberd2-bdb_<version>_arm.deb

This should create all needed directories that you don't have to create yourself anymore:

Database (for storage and authentification)/var/lib/jabberd2/db/
Process IDs?/var/run/jabberd2/

Strangely, the current jabberd2* packages for the arm architecture are missing the startup scripts for Debian [6]. To solve this problem (at least for youself), follow the tip on the bug report, and download the jabberd2-bdb package for another architecture (e.g. i386) extract it, and copy the startup scripts into the right location (also check if they're executable):

# mkdir test
# dpkg -x jabberd2-bdb_2.0s11-1_i386.deb test/
# mv test/etc/jabberd2/component.d/* /etc/jabberd2/component.d/
# rm -r test

Now we have extracted the startup scripts and can start to edit the config files. For now, just follow the basic configuration(approve sites) part of the guide. To start the jabber server you have to run

# /etc/init.d/jabberd2-bdb start

which will start all the startup scripts in /etc/jabberd2/component.d/. I haven't found a real switch to disable server-to-server (s2s) communication (if you don't want your server to connect to the other servers in the net) in the configuration files, but you can disable it by preventing the startup script /etc/jabberd2/component.d/40s2s from being executed. In my case, I've made it unexecutable and have also renamed the file (just to be sure):

# cd /etc/jabberd2/component.d/
# chmod a-x 40s2s
# mv 40s2s 40s2s.old

Viola, you now should be able to create a new account on your jabberd2 server with your favorite client.

If there have been no problems so far, you can continue with the common configuration tasks(approve sites).

view · edit · print · history · Last edited by N36.
Originally by N36.
Page last modified on May 10, 2008, at 02:38 PM