Install ejabberd on Linux

ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication. ejabberd is XMPP server software which can be used for instant messaging on your own server. ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments. The use of web-sockets in eJabberd provides the ability to seamlessly send and receive messages while a browser tab is opened.

Step #1 Install eJabberd

ejabberd is available in the Ubuntu repositories, so it’s easy to download and install. Simply run the following command to install eJabberd.

For Ubuntu
# sudo apt-get install ejabberd
For CentOS/RHEL
# yum install ejabberd

Step #2 Configure eJabberd

By default, hostname used by eJabberd is ‘localhost’, which can be modified from config file. For this installation we are using domain im.techoism.com in configuration. You may only use localhost for you local system, but for remote server use a domain or sub-domain.

# sudo vim /etc/ejabberd/ejabberd.cfg

In the config file, locate the following:

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

Modify this line to represent the correct Admin user.

%% Admin user
{acl, admin, {user, "admin","localhost"}}.
{acl, admin, {user, "admin","im.techoism.com"}}.

In the config file, locate the following:

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

Modify this line to represent the correct host name.

%% Hostname
{hosts, ["localhost","im.techoism.com"]}.

Step #3 Restart eJabberd

After making all above configuration, let’s restart eJabberd service using following command.

# sudo service ejabberd restart

Step #4 Admin Accounts

Now you need to create admin accounts for both virtual hosts localhost and im.techoism.com.

For localhost:

# ejabberdctl register administrator localhost secretpassword
User administrator@localhost successfully registered

For Domain:

# ejabberdctl register administrator im.techoism.com secretpassword
User administrator@im.techoism.com successfully registered

Step #5 Access eJabberd Web Panel

By default eJabberd admin web panel use port 5280. Access eJabberd web panel using following URL:

http://Server_IP:5280/admin
OR
http://im.techoism.com:5280/admin

ejabberd

ejabberd1

Create New User

Now you can create new user following below steps:
Virtual Hosts > Click on Host (im.techoism.com) > Users

Enter new user details and click on add users.
ejabberd2

ejabberd3

Enjoy it!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.