Tutorial

How To Install eJabberd XMPP Server on Ubuntu

Published on June 4, 2013
author

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 our products

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!

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.