Skip to content

How to Setup own Instant Messaging Server using Openfire and Spark

How to Setup own Instant Messaging Server using Openfire and Spark, This tutorial is helpful to configure your won instant messaging server using Openfire

Steps
6
On this page 6 steps

Openfire is a real time collaboration server. It uses XMPP protocol for instant messaging. This tutorial will help you to install and configure your won instant messaging server using Openfire and Spark. You can configure it to use in your LAN as well as over internet also.

Step 1 of 6Prerequisites

Before installing Openfire make sure you have java installed on your system. If you do not have Java installed use following tutorials to install Java on your system.

You also need to install Mysql server on the system (if using an external database). If you don’t MySQL installed, use the following to install it.

$ sudo apt install mysql-server   # Debian systems 
$ sudo rpm install mysql-server   # RPM based systems 
$ sudo dnf install mysql-server   # Fedora 22+ systems 

Step 2 of 6Download and Install Openfire

Use following command to download openfire or download the latest Openfire version from its official website.

RPM Based Systems:

$ wget http://download.igniterealtime.org/openfire/openfire-4.1.4-1.x86_64.rpm
$ sudo rpm -ivh openfire-3.8.2-1.i386.rpm

Debian Systems:

$ wget http://download.igniterealtime.org/openfire/openfire_4.1.4_all.deb
$ sudo dpkg -i openfire_4.1.4_all.deb

Start Openfire Service

# service openfire start

Step 3 of 6Create MySQL Database and User

Openfire provides an embedded database HSQLDB, If you want to go with that, you don’t to create MySQL account and database here. But if want to use MySQL, use the following commands to create MySQL database and user.

$ mysql -u root -p

mysql> CREATE DATABASE openfire;
mysql> GRANT ALL on openfire.* to 'openfire'@'localhost' IDENTIFIED BY 'pa$$w0rd';
mysql> FLUSH PRIVILEGES;

Step 4 of 6Configure Openfire

Openfire by default works on port 9090, Connect your server on port 9090 using the browser. It will open a configuration wizard, Follow the wizard and complete configuration. During wizard using above created MySQL credentials.

http://test.tecadmin.net:9090/
Step 1
Step 2
Step 3
Step 3
Step 4
Step 4
Step 5
Step 6
Installation Completed

Step 5 of 6Create User in Openfire

Login to Openfire admin dashboard using the admin account. Now go under Users/Groups sections then select Users section. Now click on Create New User link and enter the required details and create the user. Create the multiple users as you wants

Admin Login
Dashboard
Create User

Step 6 of 6Connect to Openfire

To connect to Openfire you need to download “spark” client software and install on your system. Download latest version of Spark for your operating system from its official website. Install spark client and log in to your account, or register new accounts.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

9 Comments

  1. what do i write in Database URL [SID] part (openfire setup). How do i get SID , i m using oracle database.

  2. Very good article Rahul.
    I’m have openfire and spark runing in a machine that performs as a server. Here I can connect with the user with no problem. But in another laptop in the same LAN, I downloaded the Spark but I am not able to connect to the domain. What could it be I am not doing properly to access from this second machine?

  3. Hi, I installed Openfire and Spak successfully. I can create users and login to Spark but Spark keeps reconnecting, it’s never been online for a while.

    Please help– issue–Spark keeps reconnecting.

  4. Rahul,

    This is a great article with nice detailed steps, thank you.

    Do you have an article how to add voip and video to OpenFire (assume the above tutorial has been completed)?

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top