eJabberd XMPP Server

Description

This page basically describes how to configure an XMPP server, specifically the ejabberd service.

Process/Implementation

Here are the steps :

  • Download the eJabberd software or just get a virtual appliance like I did. 
  • Extract the virtual appliance file into some directory that you have access to from VMWare's Converter.
  • Import that virtual machine to your virtual server.
  • Fire up the virtual machine, set the network details (ip, netmask, gateway, dns) from the console menu.
  • Login via shell access (details of credentials are on the TurnKey page linked above) and set the hostname, edit /etc/hosts for hostname, edit /etc/hostname for new hostname, and change hostname in /etc/motd.
  • Set the root password.
  • Reboot.
  • Begin using

Tuning / Customization

So at this point, the virtual appliace is up and running, on our network and all set to go.  Now we need to edit the /etc/ejabberd/ejabberd.cfg file in order to setup hostnames that our server will manage. Accounts in ejabberd (and in other xmpp servers) are in form of “user@mydomain.com”, so you need to find the following lines: 

%% Hostname
{hosts, ["localhost"]}.

and add all domains that your server will be using, for example:

{hosts, ["localhost", "mydomain.com"]}.

then, you need to enable some users that will have admin access to your server. look for “ACCESS CONTROL LIST” in the config file, then uncomment and edit any of sample acl lines. The mine looks like this:

{acl, admin, {user, “admin”, “mydomain.com”}}.

this means, that admin@mydomain.com will have the admin rights.

ok, we are done with the config. save the file and restart the server (since its already running) :

/etc/init.d/ejabberd restart

Now, you need to create the admin user. we will use a command line utility that comes with ejabberd.

ejabberdctl register admin mydomain.com password

don’t forget to change “mydomain.com” with your domain. (Note that if its already got a user with that name, and you are basically trying to change the password at that domain, just unregister that user and register it - do a man on ejabberdctl to find syntax for unregister).

Now we can access the server web interface on the port 12322 (native port 5280 but mapped via Turnkey) and add more users.  I'm also allowing users to register with their jabber clients (like pidgin or psi).  To do so, look for the following line in the config file:

{access, register, [{deny, all}]}.

and change “deny” with “allow” then restart the server.  As turnKey already has it this way, no need to change it.

Then just restart again and its all good.

Further Information

There is a good bit of documentation and information on the Internet about this.  Here are a few of the good links :

http://blog.devayd.com/2009/03/installing-ejabberd-on-ubuntu-server/

http://wiki.contribs.org/Ejabberd

 

Thats pretty much it.

Tag page
You must login to post a comment.