Quick setup of Jabber-Server (ejabberd) in Ubuntu

 
This posts documents the necessary steps to setup a running Jabber-server in Ubuntu. It uses ejabberd v2.1.5 and by the time of writing it is tested on Ubuntu 11.04.

Installation of packages

First the according Ubuntu packages are supposed to be installed:

aptitude install ejabberd

Customizing the setup

Next step is to customize two settings in /etc/ejabberd/ejabberd.cfg:

%% Admin user
{acl, admin, {user, "youruser", "yourdomain.tld"}}.

%% Hostname
{hosts, ["yourdomain.tld"]}. 

The rest should basically fly by itself.

Now an administrative user has to be added. Is is done on the command line with:

ejabberdctl register youruser yourdomain.tld yourpassword

After this, the server can be started by the following line:

service ejabberd start

If all went well, now the administrative backend should be good to go. It is accessibly with this URL:

http://yourjabberhostname.yourdomain.tld:5280/admin

Customizing the DNS entry

In order to get your server compliant with most of the clients, your domain is supposed to offer the following SRV-entries (example shows bind zonefile entries):

yourjabberhostname       IN A       IP_of_jabberhost
_xmpp-client._tcp        IN SRV     5 0 5222 yourjabberhostname.yourdomain.tld.
_xmpp-server._tcp        IN SRV     5 0 5269 yourjabberhostname.yourdomain.tld.
_jabber._tcp             IN SRV     5 0 5269 yourjabberhostname.yourdomain.tld.

Have fun with your individual jabber server!

  1. I had an issue with registering admin user, ejabberdctl said: “Can’t register user “foo@bar” at node ejabberd@host: not_allowed.” To avoid it I used command: “ejabberdctl register new_admin localhost passw0rd”

    Also I adjusted settings a bit: %% Admin user {acl, admin, {user, “new_admin”, “localhost”}}.

    %% Hostname {hosts, [“localhost”,”mydomain.tld”]

    BTW thanks for the article, it saved me a lot of time

  2. You have to issue a sudo service ejabberd restart

    Before trying to register the admin user

Leave a Comment

Trackbacks and Pingbacks: