Don't miss the latest updates, ever

[How-To] Setup Your Own Chat Server Using OpenFire

Monday, 7 September 2009, 19:57 | How-To, Tools | 13 Comments | Read 3765 Times
by Vaibhav Pandey

A few days back, i was working with a friend of mine who owns a startup and helped him with setting up an internal chat server for his internal team and employees and this article gets its motivation from there.

In order to get your own chat server running, you would need a software called OpenFire. The article will install and setup a chat server running over Windows. We will then also use a Jabber client to connect to the OpenFire chat server.

Openfire (previously known as Wildfire Server) is a Jabber/XMPP server written in Java and dual-licensed under both a proprietary license and the GNU General Public License.

In order to get started with OpenFire, first you need to download the OpenFire chat server software from here. Once downloaded,  run the Openfire installer. The application will be installed to C:\Program Files\Openfire by default.

Once the application installs, you can navigate to the standard admin console by typing in (9090 is the default admin port).

Once you have the OpenFire setup installed and configured, you can use any Jabber client to connect to the OpenFire chat server.

Follow the steps below to setup OpenFire Chat Server ( assuming you have already downloaded and extracted the contents of the zip file)

1.) Launch OpenFire by navigating to the bin folder and double clicking on Openfire.exe .

2.) Configure OpenFire by providing valid values for Domain ( this will be used by the clients to connect to the server).


3.) You can setup your own external database or use an internal database. If you are setting up the chat server for a group of more than 10 people, i would recommend that you setup your external database. You can read about how to setup an external database here.

4.) You will also be required to choose a user and group system to use with the server. You can opt to create users and assign them passwords, integrate Openfire with LDAP or integrate with a clearspace integration. If you are setting it up for a small firm, my guess is you would be using the default option.

5.) Create an admin account user id and password. You will be required to login using the admin user id next time.


The above steps help you setup and configure OpenFire. Next, you need to login to the admin console and create users for chat. Click on the menu tab Users/Groups and create new users.


Users can then use the account credentials to connect to the OpenFire server using any Jabber client. For this tutorial, i will use Spark. You can download the relevant version of Spark from here. (Look for product name “Spark”)

1.) Enter the username and password ( as created using the steps mentioned above).

2.) Enter the server hostname or IP address of the server. ( in my case,


If you have provided correct details, and if OpenFire server is running, you should have logged in now. You can see all those users who are logged in by clicking on the menu tab called Sessions.


OpenFire also provides very useful features through Plugins. You can consider installing Monitoring Service Plugin which Monitors conversations and statistics of the server. Another interesting plugin is Packet Filter which ensures that certain words are not used in the chat conversation. I also like IM Gateway which Provides gateway connectivity to the other public instant messaging networks.


You can access and search for available Plugins by navigating to the menu tab called Plugins and then clicking on the Available Plugins link.

Hope the above helps. If you are stuck with any doubts or questions, do leave them in comments and i will try to help.

You can also follow me on Twitter at

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Follow me on Twitter at @vaibhav1981
Tagged with: , , , , , , , , ,
  • Pingback: Openfire : real time collaboration (RTC) chat server « Mahesh Prasad ( Web Development ) [LAMP/AJAX/SEO/SQL/XML]

  • Pingback: How To Setup your own Chat Server using OpenFire « Welcome to site of Harshal Malshe!

  • alberto

    Hi! thanks for the tutorial!!
    but one question, which port should I open to make accesible outside my local network? i mean, which ports should I open on the router? I’m already open de 5222 port

    Thanks in advacne and best regards

  • mike

    Check your firewall/router logs for deny’s, that should tell you right off the bat.

  • rehman

    Hi, i am not able to login administration console which i created mail id and password. plz help

  • Vaibhav

    What’s the error you get?

  • william

    what if i want to log in from outside the network??wat do i do?

  • John Reeves

    Thanks for info….

  • Shankar

    I am on a LAN, i am using default settings, i get the error “Can’t connect to server: Invalid name or server not reachable” :(

    I am able to ping the server, i can login to the Admin console via browser. I am using Spark client.

    Any help on this is welcome.

  • Shradscoolcapri

    java.lang.NoClassDefFoundError: Could not initialize class org.jivesoftware.admin.LoginLimitManager$LoginLimitManagerContainer
    at org.jivesoftware.admin.LoginLimitManager.getInstance(
    at org.jivesoftware.openfire.admin.login_jsp._jspService(
    at org.apache.jasper.runtime.HttpJspBase.service(
    at javax.servlet.http.HttpServlet.service(
    at org.eclipse.jetty.servlet.ServletHolder.handle(
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.jivesoftware.util.LocaleFilter.doFilter(
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.jivesoftware.admin.PluginFilter.doFilter(
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.jivesoftware.admin.AuthCheckFilter.doFilter(
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    at org.eclipse.jetty.server.session.SessionHandler.handle(
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
    at org.eclipse.jetty.servlet.ServletHandler.doScope(
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
    at org.eclipse.jetty.server.Server.handle(
    at org.eclipse.jetty.server.HttpConnection.handleRequest(
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(
    at org.eclipse.jetty.http.HttpParser.parseNext(
    at org.eclipse.jetty.http.HttpParser.parseAvailable(
    at org.eclipse.jetty.server.HttpConnection.handle(
    at org.eclipse.jetty.util.thread.QueuedThreadPool$
    at Source)

  • Raj

    how to use server adress

  • thees_k

    your domain name should not contain “_” character

  • thees_k

    your domain name should not contain “_” character