Sparehand

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:

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):

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:

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:

Settings

In ~/.config/sparehand/sparehand.conf on the hub, applied by the next sparehand away on:

SettingDefault
SPAREHAND_AWAY_EVERY120seconds between two looks of the watcher
SPAREHAND_AWAY_GRACE360seconds the hub is unreachable before it tells you
SPAREHAND_AWAY_REMIND10800seconds before it tells you the same again

The watcher keeps its settings and a log in ~/.sparehand/away/ on the laptop.