installing ejabberd on ubuntu-server
Written by: daniel
March 20, 2009
Ejabberd is one of the most popular xmpp servers. It is used mostly as a jabber chat server, but the xmpp protocol serves for any purpose when instant messaging, and message queques are needed.
Anytime when you need people (or software components) communicate in realtime over the network, an xmpp server might be what you are looking for.
So, how to install it on an ubuntu-server?
Ejabberd package is in the offical repositories, so the installation is trivial:
apt-get install ejabberd
Once it’s done, you need to edit the /etc/ejabberd/ejabberd.cfg file in order to setup hostnames that your server will manage. Accounts in ejabberd (and in other xmpp servers) are in form of “user@domain_name”, 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", "devayd.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”, “devayd.com”}}.
this means, that admin@devayd.com will have the admin rights.
ok, we are done with the config. save the file and start the server:
/etc/init.d/ejabberd start
Now, you need to create the admin user. we will use a command line utility that comes with ejabberd.
ejabberdctl register admin devayd.com password
don’t forget to change “devayd.com” with your domain.
now you can access the server web interface on the port 5280 and add more users.
you could also allow 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.
Posted in


