Deploy your own chat application on network
Organizations often need an internal messaging platform for team communication without relying on external services. After evaluating multiple options, we found that Openfire provides a simple and reliable way to deploy a chat server within a private network or over the internet.
This guide walks through installing and configuring Openfire as the chat server and Pidgin as the client application.
Architecture Overview
Server: Openfire (XMPP Server)
Database: MySQL
Client: Pidgin (XMPP Client)
The solution can be deployed in:
- Internal LAN/Intranet environments
- Private cloud networks
- Public internet-facing environments
Prerequisites
Before starting, ensure the following requirements are met:
Server Requirements
- Linux server (CentOS/RHEL recommended)
- MySQL Server (5.6+ recommended)
- Java Runtime Environment (JRE)
Required Network Ports
| Port | Purpose |
|---|---|
| 9090 | Openfire Admin Console |
| 9091 | Secure Admin Console |
| 5222 | XMPP Client Connections |
| 5223 | Secure XMPP Connections |
| 5269 | Server-to-Server Communication |
Make sure these ports are allowed through your firewall.
Step 1: Install Openfire
Download the Openfire package.
wget http://download.igniterealtime.org/openfire/openfire-4.0.3-1.i386.rpm
Install the package:
rpm -ivh openfire-4.0.3-1.i386.rpm
Step 2: Create the MySQL Database
Log in to MySQL:
mysql -u root -p
Create a database:
CREATE DATABASE openfire;
Create a database user and grant permissions:
GRANT ALL PRIVILEGES ON openfire.* TO 'openfireuser'@'localhost' IDENTIFIED BY 'StrongPassword';
Apply the changes:
FLUSH PRIVILEGES;
Exit MySQL:
EXIT;
Step 3: Start Openfire
Start the Openfire service:
/etc/init.d/openfire start
Configure it to start automatically during boot:
chkconfig openfire on
Verify the service status:
/etc/init.d/openfire status
Troubleshooting Java Issues
If Openfire fails to start and the logs indicate Java-related errors, replace the bundled Java executable with the system-installed Java.
Navigate to the Openfire Java directory:
cd /opt/openfire/jre/bin
Backup the existing Java binary:
mv java java.bak
Create a symbolic link to the system Java:
ln -s /usr/bin/java java
Review logs if issues persist:
cat /opt/openfire/logs/nohup.out
Step 4: Configure Openfire
Open a browser and access:
http://<SERVER-IP>:9090
Language Selection
Choose:
English
and click Continue.
Server Settings
Configure the following values:
| Setting | Value |
| Domain | chatapp.domain.tld |
| Admin Console Port | 9090 |
| Secure Admin Console Port | 9091 |
Click Continue.
Database Configuration
Select:
Standard Database Connection
Choose:
MySQL
Use the following JDBC connection string:
jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true
Enter:
Database User: openfireuser Database Password: StrongPassword
Click Continue.
Administrator Account
Create the administrator account:
Administrator Email: admin@domain.tld Password: ********
Complete the setup wizard.
Congratulations! Your Openfire server is now configured.
Step 5: Create User Accounts
Log in to the Openfire Admin Console:
http://<SERVER-IP>:9090
Navigate to:
Users/Groups → Create New User
Provide the following details:
Username Full Name Email Address Password Confirm Password
Click Create User.
Repeat this process for all users who require access to the chat platform.
Step 6: Install the Chat Client
Although Spark is the official Openfire client, we found Pidgin to be lightweight, stable, and easy to configure.
Download Pidgin from:
Install the application using the standard installation wizard.
Step 7: Configure Pidgin
Launch Pidgin and navigate to:
Accounts → Manage Accounts → Add
Configure the account as follows:
| Field | Value |
| Protocol | XMPP |
| Username | User created in Openfire |
| Domain | Server IP or DNS Name |
| Password | User Password |
Example:
Protocol: XMPP Username: john Domain: chat.company.local Password: ********
Click Add.
Verification
After logging in:
- Users should appear online.
- Messages should be delivered instantly.
- Multiple users can communicate through one-to-one chats.
- Group chat functionality can be enabled through Openfire plugins.
Security Recommendations
For production deployments:
- Use SSL/TLS certificates.
- Restrict admin access using firewall rules.
- Enforce strong passwords.
- Enable regular database backups.
- Keep Openfire and Java updated.
- Use DNS hostnames instead of IP addresses.
Conclusion
Openfire provides a simple and effective way to deploy an internal chat platform using the XMPP protocol. Combined with Pidgin, it offers a lightweight messaging solution suitable for organizations that require full control over their communication infrastructure.
Whether deployed on a private LAN, corporate intranet, or public cloud environment, Openfire remains a reliable and easy-to-manage open-source chat server.
