• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How To Install eJabberd XMPP Server on Ubuntu 15.10 & 14.04

Written by Rahul, Updated on February 19, 2016

eJabberd is a robust, scalable and extensible XMPP Server. eJabberd is written in Erlang programming language. All the eJabberd features are easily accessible from any mobile app or web applications. The use of web-sockets in eJabberd provides the ability to seamlessly send and receive messages while a browser tab is opened.

Install eJabberd

eJabberd packages are available under default system repositories. You just need to use run below commands to install eJabberd packages. This will also installed Erlang programming language packages.

$ sudo apt-get install ejabberd

Configure eJabberd

For this installation we are using domain im.example.com in configuration. You may only use localhost for you local system, but for remote server use a domain or sub-domain. So at first I make a host file entry to map im.example.com with eJabberd server ip address.

$ sudo echo "192.168.10.120 im.example.com" >> /etc/hosts

Now you need to create admin accounts for your domain. Below commands will create admin accounts for both virtual hosts localhost and im.exmaple.com.

$ ejabberdctl register admin localhost password
$ ejabberdctl register admin im.example.com password

Now edit ejabberd configuration file /etc/ejabberd/ejabberd.yml in text editor and add acl for admin user for im.example.com.

acl:
  admin:
     user:
         - "admin": "localhost"
         - "admin": "im.example.com"

Now add im.example.com under hosts section.

hosts:
  - "localhost"
  - "im.example.com"

Access eJabberd Web Panel

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

$ sudo service ejabberd restart

eJabberd admin web panel start on default port 5280. Access access your domain on port 5280 followed by /admin

  http://im.example.com:5280/admin

ejabbered-login-screen

Input admin username and password of host im.example.com as shown above. If you have access ejabberd through localhost, then input login details of localhost admin account as created in above step.

ejabberd-admin-panel

Verify Setup

To verify setup we will use XMPP client and login with two different users and then try messaging between them. So first of all create two user accounts in our virtual host as per showing in below image.

  [email protected]
  [email protected]

ejabberd-create-user

Now install a XMPP client on your system. For this example we will use Gajim xmpp client, You may also use other alternatives like Pidgin etc. Use following command to install Gajim two systems.

$ sudo apt-get install gajim

Now start Gajim (from non root account) and login to Gajim on both systems with different-2 user accounts.

add-xmpp-user-in-gajim

Now, add other account from Actions >> Add Contact menu options. It will sent the request to remote user. When remote user approve or reject your request, eJabberd notify you the status of your request. On approved request, remote contact will display in your chat list.

List-of-chat-users

Finally, You can start messaging between both accounts.

gajim-chat-between-two-users

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

6 Comments

  1. Avatar prabhat rajput Reply
    January 4, 2017 at 7:20 am

    Hi, thanks for this blog. It saved my day.

  2. Avatar Sergey Reply
    December 9, 2016 at 7:06 am

    [email protected]:~$ sudo ejabberdctl register admin im.example.com password
    Can’t register user [email protected] at node [email protected]: not_allowed

    help!)))

  3. Avatar John Reply
    September 19, 2016 at 7:02 am

    Hello,

    What to do to see all options in admin panel?
    After I logged in I can see only this:

  4. Avatar roplacebo Reply
    July 9, 2016 at 3:57 pm

    Thanks for the article!

    One thing:
    Before adding the admin account for ‘im.example.com’, you have to
    add it to the hosts section of ejabberd.yml, then restart the server
    and finally you can add the admin account for the new virtual host.

  5. Avatar LF Reply
    June 3, 2016 at 6:06 am

    Hello,

    I’m currently trying to install ejabberd on my Ubuntu 14.04 server. However, after following the article, I cannot find an ejabberd.yml file in /etc/ejabberd folder. Instead there is only a cfg file.

    I reinstalled and made sure that ejabberd is the latest version. Any ideas whether I can convert my cfg to yml?

    Thanks alot!
    LF

    • Avatar AT Reply
      December 4, 2016 at 2:34 pm

      In Ubuntu 14.04 there isnt a ejabberd.yml file, you have open the ejabberd.cfg, e.g.
      sudo nano /etc/ejabberd/ejabberd.cfg

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How To Install Python 3.9 on Ubuntu 18.04 0
  • How to Use AppImage on Linux (Beginner Guide) 2
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy