Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»XMPP»How To Install eJabberd XMPP Server on Ubuntu 15.10 & 14.04

    How To Install eJabberd XMPP Server on Ubuntu 15.10 & 14.04

    RahulBy RahulFebruary 19, 20163 Mins Read

    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

    eJabberd XMPP
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Install KDE Plasma 5.10 on Ubuntu 17.04/16.04, Debian 8 & LinuxMint 18
    Next Article How to Move Running Command to Background in Linux

    6 Comments

    1. prabhat rajput on January 4, 2017 7:20 am

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

      Reply
    2. Sergey on December 9, 2016 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!)))

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

      Hello,

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

      Reply
    4. roplacebo on July 9, 2016 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.

      Reply
    5. LF on June 3, 2016 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

      Reply
      • AT on December 4, 2016 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

        Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.