Install Trigger Client on Linux

i386 / amd64, with systemd

Application location: /opt/trigger_cl

1 Deploy the Trigger Client to /opt/trigger_cl

Create the install directory, copy the binary and config.ini into it, and mark the executable runnable. systemd will launch it from exactly this path.


sudo mkdir -p /opt/trigger_cl
sudo cp trigger_cl config.ini /opt/trigger_cl/
sudo chmod +x /opt/trigger_cl/trigger_cl
    
2 Point the client at the server

Edit config.ini and fill in the [server] section. These two lines are the only required change before first start.


sudo nano /opt/trigger_cl/config.ini

# in section [server] set
ip = trigger.itperfectservice.com
port = 9000
    
3 Generate the device key

Export a per-host key file and print the matching key string. Both are needed to pair this machine with the mobile app.


sudo /opt/trigger_cl/trigger_cl --export-bin /opt/trigger_cl/key.bin
sudo /opt/trigger_cl/trigger_cl --show-key
    
4 Register the key on your Android device

Hand the key material to your phone: the binary file onto the device, the printed string into your account. From now on the phone can issue commands to this host.

  1. Copy key.bin to your Android device.
  2. In the Trigger mobile app, add it under your account.
  3. Save the printed KEY-XXXXXXXXXXXXX string — it identifies this host in the mobile UI.
5 Install the systemd unit

Write the service unit that tells systemd how to run the daemon as root with automatic restart. The heredoc creates the file in one shot.


sudo tee /etc/systemd/system/trigger_cl.service > /dev/null <<'EOF'
[Unit]
Description=Trigger client (remote kill-switch daemon)
Documentation=https://itperfectservice.com/triggercs/
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/trigger_cl
ExecStart=/opt/trigger_cl/trigger_cl
Restart=on-failure
RestartSec=10
KillSignal=SIGTERM
TimeoutStopSec=15
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
EOF
    
6 Enable autostart and start the daemon

Reload systemd so it picks up the new unit, then enable and start it in a single command. --now avoids a separate systemctl start.


sudo systemctl daemon-reload
sudo systemctl enable --now trigger_cl
    
7 Verify it is running

Check that the unit is active, then follow its journal output live. Connection errors to the server will surface here first.


sudo systemctl status trigger_cl
sudo journalctl -u trigger_cl -f