January 28, 2008

Extinguish communication blues with OpenFire

Author: Mayank Sharma

Many companies consider instant messaging to be a distraction, but IM can be an effective communication tool if used properly. OpenFire is an open source enterprise IM server that has lots of features to streamline communication within an enterprise. The server is written in Java and uses Jabber, which is one of the most popular open protocols for real-time communication. In addition to being cross-platform, OpenFire is easy to set up and administer.

While the basic version of the OpenFire server is available free of cost, an enterprise version, which costs $15 per user per year, adds features suitable for a large multi-office corporation.

Installing OpenFire

To install OpenFire, head over to the download page and choose the platform you wish to run OpenFire on. Linux users can download either a precompiled binary for RPM-based distros or a source tarball, which will work on most distros. For this article I compiled OpenFire 3.4.2, the latest version, from the tarball on Ubuntu Linux.

Since OpenFire is developed using Java, you need Sun's Java Runtime Environment (JRE), which is available as a free download from Sun or from Ubuntu's Universe repository. When you have Java on your machine, download the OpenFire tarball, move it into /opt, and untar with sudo tar zxvf openfire_3_4_2.tar.gz. Finally, start the server from under the newly untarred openfire/ directory:

$ cd /opt/openfire/bin/
$ sudo ./openfire start

This is a quick and dirty way of starting the server. While there's nothing wrong with it, in a real production environment you'd probably want to create a user for running the server and not run it as root. You might also consider running the server inside a minimal dedicated virtual machine.

Once you have the server running, you must tweak some settings from its Web interface, which runs on port 9090. To access it, launch your browser, and in the address bar enter your IP address (if you're unsure, check it by running the ifconfig command) followed by a colon and 9090. For example, if the OpenFire server is running on the machine with the IP address, then the server interface is at

The first time you launch the interface, it'll take you through a brief setup process asking questions about the default language and configuring some server settings. It'll also ask you about the database connection to use. OpenFire can work with several databases, including MySQL, PostgreSQL, Oracle, Microsoft SQL Server, and IBM DB2. You can also use OpenFire's embedded database, which is powered by HSQLDB.

One of the things you need the database for is storing user information for authentication. But if you have a directory server running on your network, OpenFire can get authentication information from either OpenLDAP or Active Directory. If you don't, OpenFire will store user information in either an external database or its embedded database, depending on which you've asked it to use. Finally seal your configuration with a password and provide an email address for the default "admin" user. On future visits to the server interface you'll have to use the admin username and the password you've specified to log in to the OpenFire server.

Run around the interface


When you log in to the server, you'll see the administration console. Here you get lots of information about the server and can also tweak its configuration. You can, for example, check the status of the server, what ports are in use, get a summary of the space being used by various server components, and browse the server logs to see if there are any warnings or errors.

You can tweak just about every setting of the server from this Web admin console. For example, while OpenFire, by default, lets users on the network create their own IM accounts and change their passwords, you might not want them to do so. You can easily change this behavior of the OpenFire server from the Registration & Login section.

The interface provides you with lots of information on your settings and offers you various options to choose from. For example, if you want to change how OpenFire handles offline messages, the server offers you various permutations to store, bounce, or drop messages. The interface is also cross-linked, which allows you quicker access to relevant configuration settings. For example, in the Server Information section, along with a list of ports in use, OpenFire has a link to the Security Settings section, where you can edit the security settings of the ports.

If you haven't integrated your IM server with a directory server or revoked users' rights to register themselves, one of things you have to do is manually register users and create groups. The Users/Groups tab lets admins add, edit, and delete users and groups, define group admins, and search for users.

Of course you can still interface OpenFire with a directory server, but you'll have to re-run the OpenFire setup for that. To do so, first stop the server with sudo ./openfire stop. Then edit the conf/openfire.xml file and set <setup>true</setup> to <setup>false</setup>. When you restart the server and head over to the admin console, OpenFire will re-run the setup tool.

Set up clients


Since OpenFire uses the Jabber protocol, you can use any IM client that supports that protocol to communicate via the server. Popular open source IM clients that support Jabber include Pidgin and Kopete. The developers of OpenFire also make available an open source client of its own called Spark.

Like OpenFire, Spark is a Java app. It requires no installation -- just download Spark for Linux, unzip the tarball, and run the executable ./Spark file to launch the client. Spark has some pretty useful features, such as an in-line spell checker, the ability to bookmark chat rooms, and tabs to manage multiple conversations. When you open a window to chat with another user, that window has buttons that let you view the user's complete profile and give you a complete time-stamped conversation history with that user. There's also a button to capture and transfer a screenshot of the desktop.

Logging in to the server with Spark or any other IM client is a piece of cake. Users need to know their Jabber ID and password. The Jabber ID looks like an email address and is in the form username@servername. So for example, if you have a user called msharma on your OpenFire server example.com, the Jabber ID will be msharma@example.com.

From Spark you can easily add users to your list of friends and create or join group chats. Group chat rooms in OpenFire can be private, protected by a password, or public. You can also choose to make a room permanent; if you don't, a room is automatically deleted when there are no members in it.

Extend with plugins

Both OpenFire server and the Spark IM client can take on new functions with plugins. By default, users can transfer files to each other from Spark. But users can curb this indiscriminate file transfer using one of the transfer guard plugin. You can configure Spark to block transfer of a file based on its extension, or its sender, or its size. If you have multilingual users on your network, try the Translator plugin, which translates messages between users using Google's Translator service.

Spark plugins can only be installed from within the client, and you can see a list of available OpenFire plugins under the Plugins tab in the admin interface. Here you can read about each plugin, browse through its changelog, and install it with a single mouse click.

Currently OpenFire offers 10 free plugins and one paid enterprise plugin. The free plugins can enhance your IM server by adding a content filter, providing the ability to integrate your Asterisk telephony system with OpenFire, or configuring your server to act as a gateway to allow users to communicate through other instant messaging services via their Jabber accounts.

I advise installing the content filter plugin, since it'll help you keep track of the conversations. It's designed to monitor your IM interactions against particular patterns and to act when a message or part of it matches a pattern. Once installed the plugin adds a new Content Filter section accessible from under the Server tab. Here you can specify patterns to look for and whether to reject or mask a message when a match is found. You can also enable a reject notification with an explanatory message and choose someone to be notified of a positive match via email or IM. Among other things, this plugin can help secure confidential data.

The one plugin you have to pay for is the Enterprise plugin. Although it's designed as plugin, it appends a lot of features to the OpenFire server. OpenFire Enterprise is a commercial extension to OpenFire that includes help desk support and also adds various tools and extends existing ones. With OpenFire Enterprise you get detailed reports on the server interactions, more control over the IM clients that can connect to the IM server, and can add a click-to-chat button to your Web site to communicate with your customers. Enterprise users also have the option of using SparkWeb, a browser-based AJAX-powered IM client.


According to Jabber's Web site, OpenFire implements more features of the protocol than any other IM server. The server complements its pedigree by being easy to setup and administer. OpenFire will suit a wide range of enterprises, from home office setups to large multi-site enterprises, since it is dual-licensed under the GPL along with a commercial extension.

The free GPLed version has a variety of features you need in an IM server, such as centralized administration of user lists, the ability to broadcast messages to entire groups, and customizable presence states. OpenFire is designed to complement other existing services running on your network as well, so it can interface with a directory server for authenticating users, or an Asterisk setup for telephony. OpenFire turns IM into a productivity enhancement tool.


  • Reviews
  • Internet & WWW
Click Here!