Scaling IM Server On-Premise for High Availability
With the PortSIP PBX HA deployment, we need to deploy the IM service on a separate server.
Before proceeding with this guide, ensure that you have already completed the High Availability Installations on Ubuntu deployment.
Install IM Service on a Separate Server
For optimal performance, it’s recommended to install the IM service on a separate server, especially when handling a large number of users for chat and file-sharing activities (including files and pictures). The following hardware specifications are suitable for supporting up to 50,000 users online, with messaging and file sharing:
CPU: 20 cores or higher
Memory: 16 GB
Disk: High I/O performance required (SSD recommended, at least 256 GB)
Network Bandwidth: 1000 Mbps or higher, particularly if handling high volumes of messages and file sharing.
Static private IP: You must configure a static private IP for this IM server. In this case, we assume it's 192.168.1.25.
Static public IP: If your PBX and IM server are located in the cloud for the internet users to access, you must have a static public IP for this IM service. In this case, we assume it's 104.18.36.110.
Supported Linux OS
It only supports 64-bit OS.
Ubuntu 24.04
For this setup, we assume the PortSIP PBX High Availability is installed on a server:
PBX Server High Availability Virtual IP address: 192.168.1.130
PBX Server static public IP address: 104.18.36.119.
Step 1: Preparing the Linux server for IM Installation
Tasks that MUST be completed before installing cluster servers.
Ensure the server date-time is synced correctly.
If the Linux server is on a LAN, assign a static private IP address, in this case, 192.168.1.25.
Assign/route the static public IP address to this server, in this case, 104.18.36.110.
Install all available updates and service packs before installing the cluster server.
Do not install PostgreSQL on the server.
Ensure that all power-saving options for your system and network adapters are disabled (by setting the system to High-Performance mode).
Do not install TeamViewer, VPN, or similar software on the host machine.
The server must not be installed as a DNS or DHCP server.
Step 2: Configuring the IP Address Whitelist
This step is mandatory; the service will not function without it.
To prevent the PBX from restricting the request rate to the IM servers, you must add the IM servers' IP addresses to the PBX whitelist. Follow the steps below to complete this process:
Sign in to the PBX web portal as the System Administrator
Select the menu IP Blacklist > Add.
Enter the IM server IP as shown in the screenshot below, and choose a long expiration date.
Step 3: Generate Token for the IM Server
Log in as the System Administrator to the PortSIP PBX HA Web portal.
Navigate to Servers > IM Servers.
Select the default server and click the Generate Token button.
Important: All below commands for extended servers must be executed on the pbx01
node, regardless of whether it is currently the active node.
Step 4: Set Password-Free Login
If you are prompted to choose an option (yes/no), please enter yes.
Step 5: Deploy the IM Service
Run the following command only on the pbx01 node of the HA PBX cluster.
The setup process may take several minutes—do not interrupt, reboot, or close the terminal until it completes.
Use the following command to deploy the IM server, specifying both the static private and static public IP addresses:
If you want to define a custom path to store IM chat files, use the -f
parameter. For example:
Parameter Reference
-a
– The static private IP address of the IM server-A
– The static public IP address of the IM server-f
– (Optional) Custom file path to store chat messages
If everything is set up correctly, the PBX web portal will display the IM server's IP address, as shown in the screenshot below.
If you have extra firewall in your network infrastructure, you must ensure that TCP port 8887 is open in the firewall rules. The client application requires access to this port in order to send and receive messages.
Managing the IM Server
Available Operations
The following operations are supported for managing IM servers:
start
– Start the serversstop
– Stop the serversrestart
– Restart the serversrm
– Remove the installed servers
The following commands apply actions to the IM server:
Start:
Stop All:
Restart All:
Remove All:
Upgrading the IM Server
Please follow the below steps to upgrade the IM server.
Please ensure you have upgraded the PBX HA as per this guide: Upgrading High Availability Installation.
Log in as the System Administrator to the PortSIP PBX HA Web portal. Navigate to Servers > IM Servers, select the default server, and click the Generate Token button to generate the new token.
Now upgrade the IM server and run the following command on the
pbx01
node. The process may take some time—do not interrupt, reboot, or close the terminal during execution.
Last updated
Was this helpful?