If you are wondering why all of a sudden I am speaking about XMPP, then WhatsApp is the answer. WhatsApp is actually using a customized version of the open standard Extensible Messaging and Presence Protocol (XMPP), also known as Jabber.
When I started exploring XMPP I found that there is a lot of stuff to learn but for now let’s quickly see how you can setup your own XMPP server for free.
AIM, Yahoo Messenger, Microsoft Lync or Google Talk are some of the common Instant Messengers that are available today and all these services requires you to register with them.
What if you want to create your own Instant Messaging service for your organization at zero cost? I can show you how to do that
What is a XMPP Server?
Extensible Messaging and Presence Protocol (XMPP) originally named Jabber is a communication protocol that can facilitate Instant Messaging (IM) in your organization.
The most commonly used XMPP servers are Ejabberd, Openfire, and Prosody. If you are interested and would like to know more about other XMPP servers that are available, then you can visit the XMPP Standards Foundation website.
Setup XMPP Server using Openfire
Openfire, previously known as Wildfire is a cross platform real-time messaging service based on XMPP protocol. The installation will be pretty easy (I am not saying other XMPP server’s will irritate you) and will support more than 50,000 concurrent users.
There are two parts involved in setting up your XMPP Server, first is setting up the server and then the client.
Setup XMPP Server
- Download (35 MB) and install Openfire XMPP server
- Since I am going to show you how to do this on Windows Operating System, I have just picked the windows installer. Openfire also supports Linux and Mac operating systems.
- Launch Openfire once the installation is completed.
- You should see a window as shown below:
- Click on Launch Admin button and it will bring up the Openfire setup wizard in your browser.
- The first screen in the wizard helps you to select your preferred language, pick one that you can read and click Continue
- The next screen is where you configure your Server Settings, enter your server name in the domain name and leave the Admin Console Port and Secure Admin Console Port with its default values and click Continue.
- In Database Settings screen select the embedded database option if you want to quickly setup things.
- In the Profile Settings screen select the Default option, you also have an option to integrate with Active Directory if you have one.
- Enter your email id and a strong password in the Administrator account screen and click continue.
- With this your installation is completed and you should see a Setup Complete message, click on the Login into admin console button.
- You should now see the Openfire Administration Console,
enter the username as admin, and enter the password that you gave in Administrator account screen.
Explore Openfire XMPP Server Administration
Before we go ahead and install the client let’s quickly take a tour around the Openfire XMPP server administration.
- When you login into the Openfire administration console you will be landing on the Server Tab, Server Manager gives you details on Server Properties, Environment and the ports that are currently used by Openfire.
- Security Audit Viewer under Server Manager logs everything that happens on your XMPP server, for example if you create a user or change password for a user, it gets logged in the Security Audit Viewer.
- Managing Client connections, Automatic User Registration, Server Certificates etc. are maintained under Server Settings.
- Users/Group Tab helps you to create new groups or users and search existing users.
- The Sessions Tab is where you could see all the client connections that are currently established to your server, we will see this when we speak about XMPP Client.
- You can also broadcast a message to all online users from Sessions, Tools, Send a message Tab.
- You can quickly create Chat Rooms by navigating to Group Chat, Room administration and click Create New Room. Room ID, Room Name and Description are mandatory, you can also specify how many users are allowed per Chat Room and also secure your chat rooms by setting passwords.
- You can check list of available Plugins that you can add to your XMPP server by navigating to Plugins, Available Plugins tab.
Before we proceed with the XMPP client installation ensure you have created a test user and a chat room.
Setup Spark XMPP Client
Now that we have successfully setup the server, the next part is setting up the XMPP client. There are lots of choices available for you but Spark is what I recommend, a cross platform client that you can download from the same Igniterealtime website which gave you Openfire.
In real world scenario you will be installing Server and Client separately but it you are just exploring the features then you can install both of them in the same machine.
- Download (39 MB) and install Spark.
- Launch Spark and enter the details of the user you had created earlier when you were exploring the XMPP Server and click Login.
- Once you have logged in, check your Sessions from the Openfire XMPP server administration and you should see the current logged in test user and the status, you can end the session of the test user from the administration screen itself.
- In Spark, click on the Conference tab and you should see a conference service list (you have to create a service before you create a room) which has the chat rooms. You wouldn’t see any conference service listed if you haven’t created one from your Openfire administration screen.
- Double Click on the conference service listed to see the list of chat rooms available in it and join the chat room that you want to be a part of