Did You Know?
Donate to TecMint

LFCS - Linux Foundation Certified SysAdmin - Exam Preparation Guide

Create Your Own Instant Messaging/Chat Server Using “Openfire” in Linux

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

With the invent of Internet, the way of communication revolutionized, a long ago. E-mail replaced traditional postal mail. Email was fast still there were some bottlenecks. One would not knew if the person on the other end is online or not, hence email was fast way of communication than postal mail but its constraints gave way to Instant Messaging (IM).

Instant Messaging like America Online (AOL) and CompuServe get famous much before Internet gets famous. We all have used and still using IM in our day-to-day life. Specially, among Young generation IM is very famous. How about setting our own chat server? Lets do it with an open-source and cross platform application called Openfire.

Install Openfire in Linux

Install Openfire in Linux

What is Openfire?

Openfire is an Instant Messaging and Group chat server, written in Java that uses XMPP (Extensible Messaging and Presence Protocol) server. Wikipedia reports, Openfire was previously called as ‘Wildfire‘ and ‘Jive Messenger‘. The Application Software is developed by Jive Software and a community called ‘IgniteRealtime.org‘, and is Licensed under Apache License.

Openfire Features

  1. Web Based Admin control
  2. SSL/TLS support
  3. LDAP connectivity
  4. User Friendly
  5. Platform Independent
Testing Environment
  1. OSUbuntu 13.04
  2. OSCentOS 6.5
  3. ApplicationOpenfire 3.8.2 [Server]
  4. ApplicationSpark 2.6.3 [Client]

Installation of Openfire in Linux

Openfire, as said above is a cross platform Application, available for all known platforms – Windows, Mac and Linux. You can download, package relevant to your OS and architecture from the link provided below:

  1. http://www.igniterealtime.org/downloads/index.jsp

You may also, use following wget command to download package and install it using dpkg or rpm command as shown below.

On Debian/Ubuntu/Linux Mint

# wget http://download.igniterealtime.org/openfire/openfire_3.8.2_all.deb
# dpkg -i openfire_3.8.2_all.deb
Sample Output
(Reading database ... 198537 files and directories currently installed.) 
Preparing to replace openfire 3.8.2 (using openfire_3.8.2_all.deb) ... 
Stopping openfire: openfire. 
Unpacking replacement openfire ... 
Setting up openfire (3.8.2) ... 
Starting openfire: openfire.

On RHEL/CentOS/Fedora

# wget http://download.igniterealtime.org/openfire/openfire-3.8.2-1.i386.rpm
# rpm -ivh openfire-3.8.2-1.i386.rpm
Sample Output
Preparing...                ########################################### [100%]
   1:openfire               ########################################### [100%]

After successful installation, Stop and Start the Openfire service.

# service openfire stop
# service openfire start

Now point the browser to “http://localhost:9090” or “http://your-ip-address:9090” and follow these simple steps to install Openfire on your machine.

1. Select Preferred Language (I chose English).

Openfire Setup Screen

Openfire Setup Screen

2. Select Domain name, Admin port and Secure Admin port. Generally you don’t need to change these data, until you need a custom port.

Openfire Server Settings

Server Settings

3. You have the option to set external database as well as or can use embedded database. Embedded database requires no external database configuration, hence is easy to configure and set, but it doesn’t give same level of performance as an external database.

Openfire Database Settings

Database Settings

4. Then, you need to setup profile setting.

Openfire Profile Settings

Profile Settings

5. The last step is to set up Admin password and email address. Note, that the current password is ‘admin‘, in new installation.

Openfire Administration Account

Setup Administration Account

6. On successful setup, confirmation message is shown.

Openfire Setup Completed

Openfire Setup Completed

7. Login to Openfire Admin using username “admin” and password, the one we set above.

Openfire Administration Console

Openfire Administration Login

8. Next, create new user.

Openfire Create New User

Add New User

9. Setup username, name, email and password for the new user.

Openfire User Details

New User Details

The server is setup successfully, you can add users, groups, contacts, plugins, etc. Since the application is X based, and is very handy, it is just a few clicks away. And now we need to download client application ‘Spark‘, for user communication.

Installation of Spark Client

Download and Install cross platform Spark client for your system using the below link.

  1. http://www.igniterealtime.org/downloads/index.jsp

Once you’ve installed Spark client, open the application and enter username, password and IP addresss of openfire server.

Install Spark IM Client

Spark IM Client

Once you logged in you can chat with the users who are online.

Spark Client

Spark Client Chat Window

Reference Links

Openfire Homepage

That’s all for now. Stay connected to Tecmint. Don’t forget to tell us, how much you liked the article, in our comment section.

I am a major in computer science, love to research nix. I love to write codes and scripts, review distros, experiment Foss Technologies, write technical articles, Hack, of course Ethically. I am working as System Administrator (nix) for a NGO.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.
Download Free eBooks
Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

50 Responses

  1. Aravindan says:

    Hi,

    How to uninstall this ???

  2. Jo says:

    Hi

    I followed your steps to install this utility on RHEL 6.4 box. The installation was successfull, however after the installation when I tried to stop the service, it says that Openfire is not running. So then I started the service. No errors were reported. And when I checked the service status using the command service openfire status, it says the openfire is not running.

    Any idea What is happening here?

    Regards
    Jo

    • Avishek Kumar says:

      Dear Jo,
      I am unable to understand, what is going on in your case.
      What it is showing when you redirect your browser to 127.0.0.1:9090?

      See your configuration file, for the port it is using. Please let us know, about your action and results.

  3. name required says:

    Like i will ever install java on any of my servers….. Sure. That is unfortunate that few apps i found which would be useful are written in java. Otherwise i would use them.
    Java is simply not going to happen.

  4. How many users can this IM server handle simultaneously? Hundreds? Thousands? Tens of thousands? I’m not talking about hardware limitation here, but just software limitation.

    • Avishek Kumar says:

      Dear Fadi(itoctopus), Your concern is very Important.
      Speaking True, we are not aware of this.
      If you find any relevant information regarding this, Please let us know with the source, so that we can update it into the article.

      Thanks

  5. Mario says:

    How to connect internet from now?

    • Avishek Kumar says:

      Dear Mario,
      we were unable to understand what you mean.
      Are you asking us how to connect to Internet?
      (Ethernet, wifi,….)

      Please be clear about your saying, we would be happy to help you.

  6. redfox says:

    Hi Sir Avishek Kumar,

    I installed the openfire..is there any possible way to add more user because I setup embedded db whick limit to 25…I also read an instruction from openfire website on migrating db. but i have problem on it. please help i am new hir

  7. Aakash says:

    Sir,
    I am a engineering student. I want to create an online messaging service (like WhatsApp)
    I would like to know how to put this config online. Can you plz refer some books that will help me understand it better.

  8. AMol says:

    Hello Avishek Kumar,

    Article which you have publish is very impressive and helpful.
    I have installed the same on Cent OS 6.3.
    Installation was successful.
    But i am able to take access through browser, Even i tried to stop and restart the service.
    Kindly Help.

  9. Mukesh says:

    Any Limitation in user, its allow only 25 user, any way for unlimited, if no kindly suggest any other tools which support unlimited

  10. mBenQ EBS says:

    Hi Avishek Kumar

    is there any other messenger than spark that compatible with openfire??? couse spark consumes alot of resource (about 200MB ram) in our pc/laptop

    thanks for your answer

  11. JTodler says:

    i exactly followed your step except i installed openfire in windows 7. I created a user through admin panel. Now i’m trying to login in spark. but spark says username and password doesn’t match. What could be the reason for this ? i double checked the user exist in DB.

  12. dkusudara says:

    Is there a way to use this with Zimbra 8 ?

  13. gaurav says:

    can i communicate my insatant messenging app developed in c# with openfier server

  14. James says:

    “Now point the browser to “http://localhost:9090” or “http://your-ip-address:9090” and follow these simple steps to install Openfire on your machine.”

    This is so confusing. If you have the nginx, where do you open this? Most Linux severs doesn’t have a browser or gnome (imagine that the servers are remote). Running firefox over X is a pain in the as*.

    http://your-ip-address:9090 won’t be accessible! Unless you set up sth. in the nginx which you didn’t mention how.

  15. disha says:

    How to connect openfire with squirrelmail in centos 6.5

  16. Ray says:

    Looking for a chat area to have video chat and text. I am looking at all my options. Something Myself and few others can monitor. With boot/tos options.

  17. Ranjeet says:

    Hi sir,

    I have configure Own Instant Messaging/Chat Server Using Openfire server side all work done but client side some problem……

    how to connect the server to user ?????????????

  18. Edward says:

    program work bt still some error in client side.

  19. Magesh M says:

    @disha,

    You can integrate Thunderbird with openfire using xmpp…For more details @ http://goo.gl/ZtckWY

    @Ranjeet,

    Can you tell me your exact issue which you are facing…For more details @ http://goo.gl/Tnd47p

  20. Irfan Dhia Irsyad says:

    I want to develop a chat client that can just connected to a specific server that we have set, and can be costumized such as changing its logo with my own logo. Is there any recommendation from you?

    • Avishek Kumar says:

      Dear Irfan,
      I don’t think it is going to be any issue as far as changing logo is concerned. Just find out the location of current logo in use and replace it with your’s.

      For the rest you have to test it and work to take it into production.

  21. Ali says:

    Hi, I am not an It expert. i am wondering if I can create some like older versions of yahoo messenger, with features like chat rooms, like yahoo desktop client etc.

    • Avishek Kumar says:

      Dear Ali,
      It is an Opensource Project, hence the codes can be modified to the degree of requirement.

      Best of Luck!

  22. Arul says:

    Dear Avishek Kumar,

    Can you give some idea that how to configure remote office spark client to access the server.

    thanks,

  23. ShortCircuit says:

    I have successfully install OpenFire 3.9.3. I can access the web based gui to start the initial configuration. However once i get to the Profile Setting i cannot get a successful connection to my Active Directory server. I have tried every combination to get it working. And there doesn’t seem to be many articles on what needs to be done. Am i missing something?

    • Avishek Kumar says:

      @ ShortCircuit,
      seems something is either wired, Messed or missed. Please post the error message so that we can understand what exactly is going on. Is it some kind of Database error?

  24. Kuldeep says:

    How can I block vulnerable words in chat..so my users can not use vulnerable words in chat and can’t use abuse words also. If any one know then please help me.

  25. Rahul PS says:

    Something strange happened with me. i have downloaded openfire using wget.
    After that i ran the command rpm -ivh openfire-3.8.2-1.i386.rpm, but it is showing no such file or directory error..

    • Ravi Saive says:

      Did you see the file using ls -l command? or else try to download again using wget and then give it a try..let’s see

  26. BaLU says:

    How can we connect using android to this openfire created server?

    Please tell me asap.

  27. BaLU says:

    apart from using spark client, I tried in my local machine it is not able to connect with my emulator. So, please let me know how it is possible!

  28. aryan shenoy says:

    windows.
    Because i got database error in installation in openfire.
    And supposed i want to make chat server. (Tecmint.com)
    Then how can i fill this domain in openfire ?
    Please help me

  29. aryan shenoy says:

    I want complete tutorial of openfire installation in windows.

  30. harque says:

    shoul i suposed to install open fire in every computer i instal spark

  31. Truong says:

    in case, I installed openfire and then I have my website.
    I would like to integrate chat to my website so that I and my customer can used it for exchanging information.

    is it possible?

Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.