By registering the Management Console (MC) as a daemon, administrators gain enhanced control over MC through the systemctl
command. This registration enables the automatic loading of MC during Linux startup, ensuring seamless integration into the system's operations. Furthermore, this daemonization facilitates an automatic failover mechanism, triggering an autorestart in the event of a crash. Together, these capabilities empower administrators with efficient management and uninterrupted functionality of the Management Console.
Steps to install and register MC as a daemon:
- Every daemon needs to be launched under its own user with limited permissions and functionality. For MC we use rslconsole
user and rslconsole
group, so first of all it's necessary to create them:
$ sudo groupadd -r rslconsole
$ sudo useradd -g rslconsole -r -m -s /sbin/nologin rslconsole
- Download MC archive and unpack it to /opt
:
$ cd /opt
$ sudo wget https://download-cdn.resilio.com/resilio-connect-builds-3/server/3.8.2.2285/resilio-connect-server-linux-x64.tar.gz
$ sudo tar xf resilio-connect-server-linux-x64.tar.gz
$ sudo rm resilio-connect-server-linux-x64.tar.gz
- Be sure to make rslconsole
user the owner of created folder:
$ sudo chown -R rslconsole:rslconsole /opt/resilio-connect-server
- Now run `update-or-install` migration script:
$ cd /opt/resilio-connect-server
$ sudo -u rslconsole ./update-or-install
- Then it's necessary to create SystemD unit file for MC:
$ sudo touch /lib/systemd/system/resilio-connect-server.service
- Now put the following content into this file:
[Unit]
Description=Resilio Connect Management Console service
Documentation=https://connect.resilio.com
After=network.target
[Service]
Type=simple
User=rslconsole
Group=rslconsole
UMask=0002
Restart=on-failure
TimeoutSec=600
ExecStart=/opt/resilio-connect-server/srvctrl run
ExecStop=kill -s SIGTERM $MAINPID
[Install]
Alias=resilio-connect-management-console
WantedBy=multi-user.target
Important note: best practice is to use a separate user with limited permissions for every service, but if it's necessary to run service under root - you can specify it in SystemD unit file:
User=root
Group=root
- Now run this command to force systemctl reload list of daemons:
$ sudo systemctl daemon-reload
- To enable MC service run at startup:
$ sudo systemctl enable resilio-connect-server
- To start or stop MC service in runtime use commands:
$ sudo systemctl start resilio-connect-server
$ sudo systemctl stop resilio-connect-server
- To view status of MC service use the following command:
$ sudo systemctl status resilio-connect-server