Skip to content

Running Resilio Connect Tracker on Linux at boot, restart on failure

On a Linux OS, there are a few ways to launch the Resilio Connect Tracker process at system boot as also restart it if it stops for a reason.

Linux Systemd Service

(recommended)

Create file /lib/systemd/system/resilio-connect-tracker.service (superuser's permissions required) with the following content.

[Unit]  
Description=Resilio Connect Tracker Service  
Documentation=https://connect.resilio.com  
After=network.target

[Service]  
Type=simple  
UMask=0002  
Restart=always  
PermissionsStartOnly=true  
User=<some_user>  
Group=<some_group>  
ExecStart=/opt/resilio-connect-tracker/tracker

[Install]  
WantedBy=multi-user.target

Before starting

Replace <some_user> and <some_group> with the user and group that will run the tracker process. Put the valid path to the binary (for example /usr/bin/tracker) to ExecStart the directive.

Save the file and run the command

sudo systemctl daemon-reload

To start the service run command

sudo systemctl start resilio-connect-tracker.service

To add service to autostart run command

sudo systemctl enable resilio-connect-tracker.service

Crontab

The easiest is to add a cron task. The minimal command is below. Every minute it will check for the running process and start it if necessary. In Terminal run command crontab -e. Enter the command below, be sure to uncomment the line (remove #)

*/1 * * * * ps -A | grep "tracker( |$)" || /home/admin/tracker/tracker

Use the valid path to tracker binary instead of /home/admin/tracker/tracker
Since cron is started from a different directory, the full path to the tracker shall be specified