Common Linux maintenance commands

Reference for HelpChat Server maintenance commands on Linux and macOS servers.

Warning

Run the following commands as an administrator in the HelpChat Server installation directory. On Linux / macOS, add the ./ prefix.

1. Service management commands

CommandDescription
helpchatsvr installInstall as a system service
helpchatsvr uninstallUninstall the system service
helpchatsvr startStart the service
helpchatsvr stopStop the service
helpchatsvr restartRestart the service
helpchatsvr statusShow service status
helpchatsvr runRun in console mode (foreground, for debugging)
helpchatsvr versionShow the version number

Example:

bash
cd /opt/helpchat_server

# Install as a system service (first deployment)
sudo ./helpchatsvr install

# Start / stop / restart
sudo ./helpchatsvr start
sudo ./helpchatsvr stop
sudo ./helpchatsvr restart

# Show status
sudo ./helpchatsvr status

# Run in the foreground console (for debugging, press Ctrl+C to exit)
sudo ./helpchatsvr run

2. When to restart

After changing the configuration file (ports, database and so on) or switching the run mode, restart the service for the changes to take effect. You can also click "Help and support" → "Restart service" in the web admin console.

Info

Restarting the service briefly disconnects all online users. The service usually comes back within 5-10 seconds.

3. Common firewall commands

Ubuntu / Debian (ufw)

bash
# Allow ports
sudo ufw allow 6800,6866,6888,6816,6898,6980/tcp

# Show status
sudo ufw status

CentOS / Kylin (firewalld)

bash
# Allow ports
sudo firewall-cmd --permanent --add-port=6800/tcp
sudo firewall-cmd --permanent --add-port=6866/tcp
sudo firewall-cmd --permanent --add-port=6888/tcp
sudo firewall-cmd --permanent --add-port=6816/tcp
sudo firewall-cmd --permanent --add-port=6898/tcp
sudo firewall-cmd --permanent --add-port=6980/tcp
sudo firewall-cmd --reload

# List allowed ports
sudo firewall-cmd --list-ports

4. Other common commands

bash
# Check the system architecture
uname -m

# Check disk space
df -h

# Check memory usage
free -h

# List HelpChat processes
ps aux | grep helpchatsvr

# Check listening ports
ss -tlnp | grep -E '6800|6866|6888|6816|6898|6980'