// Tutorial //

How To Install eJabberd XMPP Server on Ubuntu

Published on June 4, 2013
Default avatar
By Bulat Khamitov
Developer and author at DigitalOcean.
How To Install eJabberd XMPP Server on Ubuntu

First, we would have to spin up a Ubuntu 12.10 x64 droplet:

Next, login to your droplet via SSH as root.

Step 1 - Install eJabberd

apt-get -y install ejabberd

Step 2 - Setup Admin User

Change "password" to your own value:

ejabberdctl register admin localhost password

Give Admin Privileges

By default, hostname used by eJabberd is 'localhost', which can be modified from config file.

For our example we will call our admin user "admin@localhost" and modify the following lines in /etc/ejabberd/ejabberd.cfg:

%% Admin user
{acl, admin, {user, "admin", "localhost"}}.

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

Restart eJabberd

service ejabberd restart

Now you can navigate to your eJabberd Web Admin interface on droplet's IP address port 5280

 
http://198.199.90.115:5280/admin

The login username is user@domain ("admin@localhost" in our case):

From the web admin interface you can modify all the settings:

Adding New Users

From web admin interface, click Virtual Hosts -> localhost -> Users

You can also add a user from command line via SSH:

Now you can install a client like Pidgin to connect to XMPP:

Remember to use port 5222 to connect to your XMPP server using encryption:

Adding Users to your Buddy List

From Pidgin you can either press CTRL+B or from menu "Buddies" -> "Add Buddy" to buddies:

Your buddy would receive a friend request that they would have to authorize:

Now you will be able to communicate securely using XMPP and OTR encryption module in Pidgin:

And you are all done!

If you’ve enjoyed this tutorial and our broader community, consider checking out our DigitalOcean products which can also help you achieve your development goals.

Learn more here


About the authors
Default avatar
Developer and author at DigitalOcean.

Still looking for an answer?

Was this helpful?
10 Comments

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

eJabberd no longer uses the .cfg file mentioned in this writeup, and now uses .yml

@barkamlesh.nit: Unfortunately it’s not possible to install ejabberd on shared hosting.

Thank you, that is very helpful. I hope I can also find an article that helps me integrate an already created database with ejabberd’s authentication/functions

This tutorial is severely outdated. Please update.

Config is a YAML and the admin page must be accessed using https, not http.

Not works:(( http://165.227.137.175:5280/ ERR_EMPTY_RESPONSE

With the package install, how can we enable mysql configuration?

ejabberd is configured to use ‘mysql’, but the following Erlang modules are not installed: ‘[mysql, mysql_auth, mysql_conn, mysql_recv]’

Any pointers?

Hey

Can I run eJabbered on the same server as the app eJabbered is used on? Or does it need it’s own server?

My server has 4GB Ram

Not working in 16.04 , after all configuration my home page is not opening for ejabberd home with port 5280

Hi, it is not possible to establish an OTR connection when I want to send a message by Pidgin client. The eJabberd server says: “...@localhost has requested an Off-the-Record private conversation https://otr.cypherpunks.ca/. However, you do not have a plugin to support that.”. How can I add the required plugin to support OTR?

FYI ejabberd.cfg is converted to ejabberd.yml