Guide

Set up a Linux heartbeat that starts at boot

Use the TurnIt installer to keep a Linux server checking in over HTTPS, with systemd or a user cron startup entry.

Monitor the host’s ability to check in

The sender runs a small shell loop with curl. It reports that the host can execute the sender and reach TurnIt, including from a private network. It does not inspect applications, disks or scheduled job results.

You need a Linux shell and curl. The systemd mode needs root or sudo and /usr/bin/curl. The alternative user mode needs crontab and a cron daemon that runs at boot. A Raspberry Pi running a compatible Linux system uses the same setup.

Install or update the sender

  1. Create an account, then add a device with a name you will recognize in an alert.
  2. Choose and save the heartbeat interval and alert delay. These examples use 60 seconds between requests; match your sender to the saved settings. The alert delay must be at least twice the heartbeat interval and leave room for network delays.
  3. Open Heartbeat setup on the device. The dashboard provides commands with your URL and selected interval already filled in.

Replace YOUR_DEVICE_KEY with the value after v= in your device’s heartbeat URL, including the account and device identifiers. The TurnIt endpoint is already filled in. Keep your personal URL private.

Install and start a systemd service at boot (sudo required), or use cron when systemd is unavailable. Add &cron=1 inside the URL quotes to select user cron explicitly, for both install and uninstall. Run again with the same user and mode to update. The installer confirms the first accepted heartbeat.

Install / update
curl -fsSL 'https://www.turnit.app/install.sh?v=YOUR_DEVICE_KEY&interval=60' | sh
Uninstall
curl -fsSL 'https://www.turnit.app/install.sh?v=YOUR_DEVICE_KEY&uninstall=1' | sh

Read the installer script before running it. Stop an existing manual sender before installing; uninstall before switching installation methods.

Manual setup alternative

Save the script under $HOME/bin. Run it with sh to test it, then stop the foreground process before starting a background copy. Use the cron line to start it at boot.

turnit-heartbeat.sh
#!/bin/sh
while :; do
  curl --fail --silent --show-error --max-time 5 'https://api.turnit.app/api/send?v=YOUR_DEVICE_KEY' >/dev/null
  sleep 60
done
crontab -e
@reboot /bin/sh "$HOME/bin/turnit-heartbeat.sh"

Choose systemd or user cron

The installer selects systemd when it is available and reachable, enables a service for this device at boot and starts the sender. Otherwise it uses a user cron entry for startup and launches the sender immediately. Cron starts a continuous heartbeat loop; this is not a monitor of cron job completion.

Use the same user and mode when updating or removing an installation. To force user cron, add &cron=1 inside the quoted URL for both installation and removal. Remove the previous mode before changing modes.

For manual setup, create $HOME/bin before saving the example script. Run it in the foreground with sh first, then stop it before launching another copy. An @reboot line takes effect on the next boot and requires the cron service to be enabled.

Verify and troubleshoot

The installer reports First heartbeat accepted only after a successful request. Then check Last heartbeat in the dashboard. If it cannot confirm the request, inspect connectivity, DNS and the copied URL; the installed sender will keep trying.

HTTP 429 means requests arrived too soon. Avoid duplicate senders and respect Retry-After. After changing the device interval in TurnIt, rerun the installer with the new command from the dashboard. Uninstall using the removal command for that device and mode.

Give your device a way to check in

Create a device to get your own heartbeat URL and setup instructions.