Skip to main content

Service Deployment and Upgrade

After registering clmBot as a system service, the clmBot server can run persistently and start automatically with the system, making it suitable for servers that use the cloud push method. This page also introduces hot reload configuration, runtime logs, and client upgrades.

Register as a System Service​

Prerequisite: You have completed login integration as described in Quick Start.

Run the following command to register the clmBot server as a system service:

./clm-bot-linux-amd64 server --service install -a="0.0.0.0:8862"

Registration notes:

  • On Linux, it is registered as a systemd service; on Windows, it is registered as a Windows service with the same name. Both support starting automatically at boot.
  • The service name is ssltrus-clm-bot-<节点ID>-<端口>, and the node ID is the clmBot ID assigned during onboarding.
  • The service runs with the configuration file and listening address specified during installation, and the working directory is the directory where the configuration file is located.

If you need to install the service as the currently logged-in user (instead of at the system level), you can add the --user parameter.

Managing the service​

Manage the service through server --service <动作>:

./clm-bot-linux-amd64 server --service status    # 查看服务状态
./clm-bot-linux-amd64 server --service start # 启动服务
./clm-bot-linux-amd64 server --service stop # 停止服务
./clm-bot-linux-amd64 server --service restart # 重启服务
./clm-bot-linux-amd64 server --service uninstall # 卸载服务(卸载前自动停止)

Configuration Hot Reload​

By default, the clmBot server has configuration hot reload enabled (--watch, enabled by default): after modifying config.yaml, the configuration will be automatically reloaded without restarting the service.

To disable hot reload, explicitly specify --watch=false at startup.

Viewing Runtime Logs​

clmBot runtime logs are located at logs/clm-bot.log in the directory where the configuration file resides, and console output is also recorded to this file.

Log files rotate automatically:

  • A single log file can be up to 30 MB.
  • Logs are retained for the last 90 days.
  • A maximum of 10 backup files are kept.

Upgrading clmBot​

Run the following command to check for and upgrade to the latest version:

./clm-bot-linux-amd64 update

After execution, clmBot checks the latest version of the current platform from the official release source:

  • If it is already the latest version, it outputs the current version number and skips.
  • If a new version is available, it automatically downloads and verifies file integrity (SHA-256), then replaces the current executable file.

View the current client version:

./clm-bot-linux-amd64 --version
Note

After the upgrade is completed, if clmBot is running as a system service, run server --service restart for the new version to take effect.

Windows Built-in Command Terminal​

On Windows servers, running the clmBot executable directly without parameters opens the built-in command terminal. This terminal can only execute clmBot subcommands. Enter help to view commands and exit to exit, making it suitable for use in restricted IT operations environments.