Docs menu

Several machines

Join your computers together: the one that stays on at home, a spare one, one somewhere else. Paired machines list each other's apps, publish on each other, keep backup copies of each other's apps, and update together.

What you need

  • Secretbase installed on each computer, anywhere: in the same house or far away, on another Tailscale account too. Nothing changes on your router.
  • One free public address on each machine, unless the online dashboard or a token already uses one.

Pair two machines

On the first machine:

$ secretbase machines add
On the other machine, run:

  secretbase machines join <address> <code>

The code works once, for 10 minutes (until <time>). Making a new code cancels this one.

On the other machine, run that whole line, as yourself (not with sudo). It says "Paired with <name>. Both machines now list each other". On the dashboard: Machines, Make a pairing code on one, and Join a machine on the other.

A paired machine can publish, see, take offline, delete, set keys for, back up and restore apps on the other. It can never read a key's value, see the recovery key, change backup places, make tokens or sign in to anything.

See all your machines

$ secretbase machines
This computer: <machine>, version <version>: …, 1 app(s)
  my-app  public  <address>

No other machines yet. Add one with: secretbase machines add

Once paired, each machine is listed with its version, free public addresses, free memory and apps. The dashboard's Machines page shows the same.

Publish on another machine

Add --on <name> (the name machines shows):

$ secretbase publish . --on server

--on also works with status, logs, delete, offline, online, backups, backup and restore. The app runs on that machine, at that machine's address. --on any picks one: an app that already exists stays where it is; a new one goes to the machine with a free public address and the most free memory. On the dashboard, choose under Where. Only the user who paired the machines works on the other one this way: there, it acts as that user.

Backup copies on another machine

secretbase places add-machine server keeps backup copies on that machine. Every copy is encrypted before it leaves this computer, and the other machine can't open it. When that machine is in another building, also run secretbase machines elsewhere server on. See Backups and restore.

Update every machine at once

secretbase update --all updates this computer and every paired machine, each from its own site, and shows each result. On the dashboard: Update all machines on the Machines page.

Remove a machine

secretbase machines remove server says "Removed server. It removed this computer too." New backup copies stop going to it; the copies it already keeps stay until you delete them there.

If something goes wrong

  • "That pairing code is wrong, used or expired": make a new one with secretbase machines add. After 5 wrong tries a code stops working.
  • "Other machines can't reach this one: it has no free public address": delete an app on that machine to free one.
  • "Can't reach the machine <name>": check that it is on and online.
  • "<name> doesn't accept this machine any more": it was removed there, or the two clocks differ by more than 5 minutes. Check both clocks, or remove it and pair again.
  • "None of your machines has a free public address for a new app": delete an app on one of them.
  • "This computer can't update itself": install the new version there once with the command from the download page.