Report this

What is the reason for this report?

How To Install eJabberd XMPP Server on Ubuntu

Published on June 4, 2013
Bulat Khamitov

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

About the author

Bulat Khamitov
Bulat Khamitov
Author
Category:
Tags:

Still looking for an answer?

Was this helpful?
Leave a comment...

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!

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

Hmmm - all I have listed in my CP is this:

When I click on virtual hosts:

Virtual Hosts [Guide: Virtual Hosting] Host Registered Users Online Users

my CP doesn’t look anything like the screenshot - barebones :( - any ideas?

Thank you, very helpful…

How can i Configure ejabber On goDaddy Linux shared Hosting?

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

404 Error when calling from the browser

Thanks…

2 Questions:

  1. How can I install latest version of ejabberd i.e. 14.07?
  2. I have installed ejabberd via the above procedures and I was able to install ejabberd. However whenever I try adding a custom module for Push Notification, offline_message_hook doesn’t get called.

Good explanation :)

The weg login with @localhost did not work for me, so I added a domain as a host, then it worked.

Thank you, It is very helpful. But I cannot start Ejabberd.

adduser: Warning: The home directory `/var/lib/ejabberd' does not belong to the user you are currently creating.

How can I fix it?

Thank you.

Creative CommonsThis work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

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.