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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

Next, login to your droplet via SSH as root.

Step 1 - Install eJabberd

ejabberd illustration for: Step 1 - Install eJabberd
				
					apt-get -y install ejabberd
				
			

<h2>Step 2 – Setup Admin User</h3>

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):

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

Adding New Users

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

Adding Users to your Buddy List

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

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

<img src="images/how-to-install-ejabberd-xmpp-server-on-ubuntu-section-1.png; width="680">

And you are all done!