Docs › Travel mode: working on the hub from elsewhere
Travel mode: working on the hub from elsewhere
Away from home with a laptop, you keep working on the hub and its workers, as at your desk. Your code, the jobs and the machines all stay at home:
- Claude Code sessions run on the hub, and you work in them from the laptop, a phone or claude.ai through Claude's Remote Control. Heavy jobs from those sessions still go to the workers at home.
- The dashboard (machines, jobs, Studio, Crew, screens) opens on your tailnet (remote-access.md).
- The workers at home are woken by the hub over the home network when a job needs them (wake-and-sleep.md), so they can sleep in between.
Don't run sparehand run from a checkout on the laptop itself: the workers accept jobs only from the hub. Work in sessions on the hub instead (or move your changes there with git).
Travel mode adds the two things this setup can't do by itself: a check before you leave, and a warning when the hub goes dark.
Before you leave
sparehand away check mylaptop # mylaptop: the Mac you take with you, one of your workers
It goes through what working from elsewhere needs, one line each: ok, note (worth knowing), or fix (it won't work until you do; the command then exits 1):
- The hub: it never sleeps; it starts again by itself after a power cut (a Mac's Start up automatically after a power failure); FileVault (see below); free disk.
- Tailscale on the hub: connected; its key doesn't expire (it would drop off the tailnet while you're away: turn key expiry off for machines at home); the dashboard published with
tailscale serve. - The dashboard: running, with your Tailscale login in
allowedLogins. - Claude: the Claude app running on the hub, for Remote Control.
- The workers at home: on, or asleep with Sparehand able to wake them; FileVault on any of them.
- The Mac you take: Tailscale running on it, its key's expiry, and the dashboard opened from it over Tailscale. That last one catches both an
allowedIPslist inapp.jsonthat leaves it out and tailnet access rules that don't let it reach the hub on port 443.
In the dashboard, the hub's card (Machines) has Travel mode…: choose the Mac you take, then Check shows the same lines, and Turn on and Turn off do what the commands below do. Since the dashboard opens over Tailscale, you can turn travel mode off from the laptop too, wherever you are.
Run it while the Mac is still at home: the hub reaches it over the home network to look. Better still, also try the dashboard and a Remote Control session once over your phone's hotspot.
Turning it on
sparehand away on mylaptop
The same check, then:
- mylaptop is switched off here (as with
sparehand disable), so no jobs wait on it while it travels. - mylaptop gets a watcher (
lib/away-watch.sh, a LaunchAgent that looks every 2 minutes). When the hub has been unreachable for 6 minutes it shows a notification there, with the likely reason, and another when the hub is back:- another machine at home is online: the hub itself is off or restarting (with FileVault on, waiting at its password screen after a power cut);
- nothing at home is online: the power or the internet at home is out;
- the hub is online but its dashboard doesn't answer: the Sparehand app there has stopped (Remote Control sessions may still work).
It reads Tailscale's own view of which machines are online. It can only tell "the hub alone" from "all of home" when your access rules let the laptop see another machine at home on the tailnet (away check says when they don't). While the laptop itself is offline (a plane, a hotel's sign-in page) it says nothing, and while Tailscale is off on it, it tells you that instead. It says each thing once, then again after 3 hours if it's still so.
sparehand away on without a name only records that you're away, with no watcher.
sparehand away says whether travel mode is on. When you're back:
sparehand away off
mylaptop is switched on again (unless it was switched off before travel mode) and its watcher is removed. If mylaptop isn't home yet, its watcher stays until a later sparehand away off reaches it.
Power cuts and FileVault
A Mac with FileVault on waits at its password screen after it starts, before Tailscale, the Sparehand app or anything else runs. After a power cut, the hub stays unreachable until someone at home types the password. The watcher tells you when this happens; to keep it from happening:
- a UPS (a battery the hub plugs into) rides out short cuts;
- a restart you start yourself from elsewhere skips the password screen once with
sudo fdesetup authrestart(in an SSH or Remote Control session on the hub).
Settings
In ~/.config/sparehand/sparehand.conf on the hub, applied by the next sparehand away on:
| Setting | Default | |
|---|---|---|
SPAREHAND_AWAY_EVERY | 120 | seconds between two looks of the watcher |
SPAREHAND_AWAY_GRACE | 360 | seconds the hub is unreachable before it tells you |
SPAREHAND_AWAY_REMIND | 10800 | seconds before it tells you the same again |
The watcher keeps its settings and a log in ~/.sparehand/away/ on the laptop.