Tutorial

How To Install eJabberd XMPP Server on Ubuntu

Published on June 4, 2013
Default avatar

By Bulat Khamitov

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!

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us


About the authors
Default avatar
Bulat Khamitov

author

Still looking for an answer?

Ask a questionSearch for more help

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

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
July 1, 2014

@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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel