This tutorial attempts to guide the reader through the process of installing Bandersnatch for use with an existing Jabberd2 server.

Get the sources

We need the following:

Extract the Bandersnatch installation into a working directory. Install all the above modules, with their dependencies.

Configure database

Ensure that you have a working mySQL server installation. To automatically create the database permissions / structure, run the following command (as a priviledged mySQL user) from the Bandersnatch working directory:

mysql -p < bandersnatch.sql

Then restart the mysql server (we have changed permissions, must reload), by running :

kill -HUP `pidof mysqld`

(If this doesn’t work, restart mySQL manually. This may depend on your distribution)

Config files


This file is where the router gets its component and secret information from for component authentication. We want to tell it about a component called “bandersnatch”, whose secret is also “bandersnatch”…

Add the following lines:


…between the new tags. i.e., a file modified from default will now look like this:



Now that we have defined our component (above), we need to give it access to connect to the router, and log messages. Edit router.xml, and at the bottom, uncomment the log type ACL, as follows:

<acl type='log'>


Finally, we edit bandersnatch’s config.xml, make sure the following are set:


Double-check the port (you may have to change it from 5526 to 5347), and the component name. Also, as per the Bandersnatch documentation, make sure that is set to the name of your jabber server, else you won’t log anything :)

Run it

Finally, once you’ve confirmed that:

  1. Jabberd is running properly
  2. MySQL is running properly
  3. Bandersnatch tables have been created in mySQL
  4. The script is executable (“chmod 755” if it’s not)



The output should be something like this:

{% highlight perl %} Use of uninitialized value in substitution (s///) at /usr/local/share/perl/5.8.4/POE/Component/Jabber/Client/ line 293. Use of uninitialized value in subroutine entry at /usr/local/share/perl/5.8.4/POE/Component/Jabber/Clien t/ line 294.
Connected to MySQL database (bandersnatch@localhost) … Bandersnatch is listening! ;) {% endhighlight %}

I ignore the errors. I think they have to do with the Jabber component, and they aren’t fatal. If anybody wants to enlighten me, please go ahead :)

You’ve successfully subscribed to 🧑‍💻 Funky Penguin
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Your link has expired
Success! Check your email for magic link to sign-in.