Deploying Openfire
Introduction
Openfire is an open-source real-time collaboration server powered by the XMPP (Extensible Messaging and Presence Protocol) standard. Written in Java, Openfire provides enterprise-grade instant messaging with support for one-on-one chat, group messaging, presence information, and extensible features through plugins.
Originally known as Jive Messenger, Openfire has evolved into one of the most widely deployed XMPP servers, offering a balance of simplicity and power. The web-based admin console makes configuration straightforward, while the plugin system allows extending functionality for specific use cases.
Key highlights of Openfire:
- XMPP Compliant: Full implementation of the XMPP protocol for interoperability
- Web Admin Console: Browser-based administration interface
- Plugin Architecture: Extend functionality with community and custom plugins
- Multi-User Chat: Create chat rooms for team collaboration
- Presence Information: Real-time online/offline status for all users
- Federation: Connect with other XMPP servers for cross-organization messaging
- LDAP Integration: Authenticate against existing directory services
- Clustering: Scale horizontally for high-availability deployments
- Security: TLS encryption, SASL authentication, and security policies
- Extensible: REST API, webhooks, and plugin development support
This guide walks through deploying Openfire on Klutch.sh using Docker, configuring user authentication, and setting up the messaging server for production use.
Why Deploy Openfire on Klutch.sh
Deploying Openfire on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys your messaging server. Push to GitHub, and your XMPP server deploys without manual intervention.
Persistent Storage: Attach persistent volumes for database, configuration, and plugins. Your messages and settings survive container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for the web admin console and secure XMPP connections.
Always-On Messaging: Your messaging server runs 24/7, ensuring team members can communicate regardless of time zones.
GitHub Integration: Store configuration in Git for version-controlled infrastructure. Update by pushing changes.
Scalable Resources: Allocate CPU and memory based on user count and message volume.
Custom Domains: Use your organization’s domain for professional messaging addresses (user@company.com).
Prerequisites
Before deploying Openfire on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Openfire configuration
- Basic familiarity with Docker and containerization concepts
- A domain name for your XMPP server
- (Optional) LDAP server for directory integration
Understanding Openfire Architecture
Openfire consists of several components:
Core Server: Handles XMPP protocol processing, routing messages, and managing sessions.
Connection Managers: Handle client connections over various protocols (XMPP, BOSH, WebSocket).
Database: Stores user accounts, message history, roster data, and configuration. Supports embedded and external databases.
Plugin System: Loads optional functionality including MUC (multi-user chat), HTTP binding, and custom features.
Admin Console: Web-based interface for server configuration and monitoring.
Preparing Your Repository
Create a GitHub repository containing your Dockerfile and configuration.
Repository Structure
openfire-deploy/├── Dockerfile├── .dockerignore└── README.mdCreating the Dockerfile
Create a Dockerfile for Openfire:
FROM igniterealtime/openfire:latest
# Create directories for persistent dataRUN mkdir -p /var/lib/openfire/embedded-dbRUN mkdir -p /var/lib/openfire/pluginsRUN mkdir -p /etc/openfire
# Environment configurationENV OPENFIRE_CONSOLE_SECURED=true
# Expose ports# Admin consoleEXPOSE 9090EXPOSE 9091
# XMPP portsEXPOSE 5222EXPOSE 5223EXPOSE 5269EXPOSE 5270EXPOSE 5275EXPOSE 5276
# BOSH/WebSocketEXPOSE 7070EXPOSE 7443
# Use default entrypointOpenfire Ports Reference
| Port | Protocol | Description |
|---|---|---|
| 5222 | XMPP Client | Standard client connections |
| 5223 | XMPP Client SSL | Legacy SSL client connections |
| 5269 | XMPP Server | Server-to-server federation |
| 5270 | XMPP Server SSL | Server-to-server SSL |
| 5275 | XMPP Component | External component connections |
| 5276 | XMPP Component SSL | External component SSL |
| 7070 | HTTP Binding | BOSH connections |
| 7443 | HTTPS Binding | Secure BOSH/WebSocket |
| 9090 | Admin Console | HTTP admin interface |
| 9091 | Admin Console SSL | HTTPS admin interface |
Deploying Openfire on Klutch.sh
Follow these steps to deploy your Openfire server:
- 9090/9091: Admin console (HTTP)
- 5222: XMPP client connections
- 7443: WebSocket/BOSH connections
- Select your language
- Configure server domain name
- Choose database type (embedded or external)
- Set admin credentials
- Complete the setup wizard
- Navigate to Server > TLS/SSL Certificates
- Import or generate certificates
- Enable TLS for client and server connections
Configure DNS Records
Set up DNS records for your XMPP domain:
# A Record for serverType: AHost: xmppValue: (Your Klutch.sh IP)
# SRV Records for client discoveryType: SRVHost: _xmpp-client._tcpValue: 5 0 5222 xmpp.yourdomain.com
# SRV Records for server-to-serverType: SRVHost: _xmpp-server._tcpValue: 5 0 5269 xmpp.yourdomain.comPush Your Repository to GitHub
Initialize and push your repository:
git initgit add Dockerfile .dockerignore README.mdgit commit -m "Initial Openfire configuration"git remote add origin https://github.com/yourusername/openfire-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “openfire” or “messaging”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Openfire Dockerfile.
Configure Network Traffic
Configure ports for your deployment. Essential ports:
Set Environment Variables
Configure basic settings:
| Variable | Value |
|---|---|
OPENFIRE_CONSOLE_SECURED | true |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/lib/openfire | 20 GB | Database and configuration |
/usr/share/openfire/plugins | 5 GB | Installed plugins |
Deploy Your Application
Click Deploy to start the build process.
Complete Initial Setup
Access the admin console at https://your-app-name.klutch.sh:9090:
Configure TLS Certificates
In the admin console:
Admin Console Configuration
User Management
Create and manage users:
- Navigate to Users/Groups > Users
- Click “Create New User”
- Enter username, password, and details
- Assign groups if applicable
Group Management
Organize users into groups:
- Go to Users/Groups > Groups
- Create groups for teams or departments
- Add users to groups
- Groups can share rosters automatically
Chat Rooms
Create multi-user chat rooms:
- Navigate to Group Chat > Group Chat Rooms
- Create a new room
- Configure room settings (persistent, members-only, etc.)
- Assign moderators
Plugin Installation
Essential Plugins
Consider installing these plugins:
- Monitoring Service: Message archiving and compliance
- REST API: Programmatic server management
- HTTP File Upload: File sharing in chat
- Push Notification: Mobile push notifications
- Bookmarks: Shared conference room bookmarks
Installing Plugins
Via admin console:
- Navigate to Plugins > Available Plugins
- Find the desired plugin
- Click the install button
- Restart if prompted
Plugin Configuration
Configure installed plugins:
- Go to Plugins > Plugins
- Click on the plugin name
- Access plugin-specific settings
Client Configuration
Desktop Clients
Compatible XMPP clients:
Mobile Clients
- Conversations (Android)
- Siskin IM (iOS)
- Monal (iOS, macOS)
Web Clients
- Converse.js (JavaScript library)
- JSXC (JavaScript client)
Client Connection Settings
Configure clients with:
- Server:
xmpp.yourdomain.com - Port:
5222(or 5223 for legacy SSL) - Username:
useroruser@yourdomain.com - Connection security: STARTTLS or SSL
Directory Integration
LDAP Configuration
Connect to existing directory services:
- Navigate to Server > Server Settings > Profile Settings
- Select “LDAP” for user provider
- Configure LDAP connection:
- Server hostname and port
- Base DN for users
- Admin DN and password
- Search filter
Active Directory
For Active Directory integration:
Host: ad.company.comPort: 389 (or 636 for LDAPS)Base DN: DC=company,DC=comAdmin DN: CN=ldap_admin,OU=Service Accounts,DC=company,DC=comFederation
Server-to-Server Communication
Enable federation with other XMPP servers:
- Navigate to Server > Server Settings > Server to Server
- Enable server-to-server connections
- Configure allowed/blocked domains
- Set up DNS SRV records
Security Policies
Control federation security:
- Require TLS for all server connections
- Use certificate verification
- Whitelist trusted domains
Security Configuration
TLS/SSL Setup
Secure all connections:
- Generate or import certificates
- Enable STARTTLS for client connections
- Require encryption for sensitive deployments
- Configure certificate chains
Password Policies
Enforce strong passwords:
- Navigate to Server > Server Settings > Security Settings
- Set minimum password length
- Require password complexity
- Configure password expiration
Connection Policies
Control access:
- Limit concurrent connections per user
- Configure connection timeouts
- Set maximum message sizes
- Enable rate limiting
Troubleshooting Common Issues
Cannot Connect from Clients
Symptoms: XMPP clients fail to connect.
Solutions:
- Verify port 5222 is accessible
- Check TLS certificate configuration
- Verify DNS SRV records
- Review server logs for connection errors
Admin Console Inaccessible
Symptoms: Cannot access web admin.
Solutions:
- Verify ports 9090/9091 are exposed
- Check the deployment is running
- Try both HTTP and HTTPS
- Review container logs
LDAP Authentication Failing
Symptoms: Users cannot log in with LDAP credentials.
Solutions:
- Verify LDAP server connectivity
- Check bind DN and password
- Verify search filter syntax
- Test LDAP connection independently
Messages Not Delivered
Symptoms: Messages fail to reach recipients.
Solutions:
- Verify both users are properly registered
- Check server logs for routing errors
- Ensure recipients are online or offline storage is enabled
- Review message archive for delivery status
Additional Resources
- Openfire Official Website
- Openfire Documentation
- Openfire GitHub Repository
- Ignite Realtime Community
- XMPP Standards Foundation
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Openfire on Klutch.sh provides a robust, standards-based messaging platform for your organization. With XMPP compliance, extensible plugins, and comprehensive administration, Openfire delivers enterprise-grade instant messaging.
The combination of persistent storage for messages and configuration, reliable uptime, and HTTPS security makes Klutch.sh an excellent platform for hosting Openfire. Whether enabling team collaboration or building chat into your applications, your self-hosted XMPP server provides the control and reliability that cloud messaging services cannot match.
Start with basic messaging, then expand with plugins, directory integration, and federation as your needs grow. With Openfire on Klutch.sh, you own your communication infrastructure.