Trailside Docs
DocsKeep it working All docsMenu
DocsKeep it working

Keep a Computer working while you’re away

Work runs only while trailside up runs on a paired Computer. Set it up to start again on its own, and know which steps still need you.

Sample. Trailside is in development. These docs describe how the product is meant to work. The Sample Board uses fictional data and runs nothing.

Install the login service

Without a login service, work runs only while trailside up is running in a terminal. The login service starts trailside up for you and starts it again when it stops unexpectedly. A stop that needs you, such as revoked access, shows on the Computers page as Needs you: Companion stopped.

Install it on the paired Computer, with the installed trailside, after trailside up has paired it:

TerminalLogin service
trailside service install
trailside service status
trailside service logs
trailside service uninstall
CommandWhat it does
trailside service installInstalls and starts the login service: a systemd user service on Linux and WSL2, a LaunchAgent on macOS and a Task Scheduler task on Windows. It refuses when no Supported Agent (Claude Code or Codex) is on the PATH it would run with.
trailside service statusSays whether the login service is running and shows its newest log lines.
trailside service logsShows the login service’s log.
trailside service uninstallRemoves the login service. Pairing, state and Connect consent are kept.

Options you would give trailside up, such as --post-answers (Board actions) or --notify, go on trailside service install instead. Run it again to change them. Restart Companion on the Computers page works only on a Computer with the login service.

After a restart

On Linux, trailside service install also turns on lingering, so the login service starts when the Computer boots, before anyone logs in. If it could not, it prints Linger: not enabled and the loginctl enable-linger command to run.

On macOS the login service starts when you log in to the Mac, and on Windows when you sign in to Windows.

WSL2 does not start when Windows boots. On WSL2, trailside service install also adds a Windows task that starts this WSL distribution when you sign in to Windows and keeps it running; lingering then starts the login service inside it. After a Windows restart, nothing runs until you sign in to Windows. A later wsl --shutdown still needs WSL restarted locally or a new Windows sign-in.

A Run cut off by a restart is not run again. Its outcome is unknown, and this Computer takes no new work until it is fixed there. The Computers page then says: A Run there ended with an unknown outcome, so it takes no new work. Unpair it, then pair it again in a new state directory.

To restart the Companion without cutting off a Run, use Restart Companion on the Computers page: current cards finish before the Companion restarts. Before restarting the Computer itself, check that no Run is in progress.

After a network loss

While trailside up runs, it reconnects by itself when the network comes back.

If the connection stays lost for 5 minutes while cards wait in Ready, it opens a fresh connection. If that has not worked 5 minutes later, a trailside up run by the login service exits so the service starts it again. It never does this while a Run is in progress, and at most 3 times an hour. Without the login service it keeps trying fresh connections instead.

trailside doctor shows the last such restart in its watchdog check. On WSL2, a missing /etc/resolv.conf after a restart stops every name lookup; the dns check says how to fix it.

Headless store or OS keyring

This Computer’s key is kept in the OS secret store: the login Keychain on macOS, Credential Manager on Windows and the Secret Service keyring on Linux and WSL2. On macOS, unlock the login Keychain if it asks. On Windows, Credential Manager unlocks when you sign in.

On Linux and WSL2, trailside service install moves the key to a headless store that unlocks on its own after a restart: systemd-creds, or the root helper where systemd credentials are unavailable and the helper is installed. If neither is available, it keeps the keyring and prints how to install the helper with trailside service helper-script. To choose a store yourself, run trailside service install --secret-store systemd-creds or trailside service install --secret-store keyring.

With the keyring on Linux, the keyring locks after a restart. trailside up then waits offline and tries again, first after 5 seconds and then at most 5 minutes apart, and trailside service status says Waiting: the secret store is locked. Run trailside unlock from a desktop or WSLg session and type your keyring password in the window that opens. Trailside never sees it, and a waiting trailside up carries on by itself.

The Computers page shows the store this Computer reported. systemd-creds and root-helper unlock on their own after a restart; the OS keyring may wait for trailside unlock.

What the Computers page shows

An offline Computer shows Offline since and the time it was last in contact, with a reason and one next step. These are the next steps it suggests:

Computers page showsNext step it suggests
Offline, connection lostWhile the Companion is running, it reconnects by itself. On this Computer, run trailside doctor to check why it is offline. If the secret store is locked, run trailside unlock. If the Companion has stopped, run trailside up or install the login service with trailside service install.
Stopped, with the login serviceRun trailside service status on this Computer; it says why the login service stopped and how to resume.
Stopped, without the login serviceRun trailside up on this Computer.
Restarting at your requestIts login service starts it again by itself. If it has not come back, run trailside service status on this Computer.

Open your Computers

Checks to run

Run trailside doctor on the Computer when it is offline or a step above did not work. It checks local state, pairing, the lock, the install, the last agent check and the login service; on Linux also the keyring lock and DNS. Each check that needs you ends with Next: and what to do.

Command or checkWhat it tells you
trailside doctor --networkAlso asks the service once whether it answers.
trailside doctor --fixApplies only a short list of repairs, such as agent sign-in and stale Worktrees, then checks again.
login_serviceOn macOS and Windows: whether the login service is running, restarting or stopped, from the record it keeps in the state directory; if no login service has run, it names trailside service install. On Linux and WSL2: whether the login service is installed and lingering is on. With lingering off it starts only once you log in, and on WSL2 stops when the last terminal closes.
secret_storeLinux: whether the keyring that holds this Computer’s key is locked.
dnsLinux: whether /etc/resolv.conf can be used.
windows_startupWSL2: whether the Windows task that starts this distribution is set up.
watchdogThe last restart after a network loss.

Not automatic yet

Some steps still need a person at the Computer.

  • On macOS and Windows, nothing starts until you log in after a restart.
  • On WSL2, nothing starts until you sign in to Windows after a restart; that sign-in starts the distribution.
  • On Linux with lingering off, the login service also waits for a login, and on WSL2 it stops when the last terminal closes.
  • After wsl --shutdown, WSL needs a local restart or a new Windows sign-in.
  • With the keyring on Linux, run trailside unlock after each restart. On a server, use the headless store instead.
  • A Run cut off by a restart is not run again, and the Computer needs pairing again before it takes new work.
  • Without the login service, work stops when the terminal running trailside up closes.

Install the Trailside CLI Open your Computers