Skip to content

Self-hosting and security

Add a computer over SSH

Turn one of your SSH servers into an Octant computer that joins your hub, without visiting it, then update it or remove Octant from it over the same connection.

  • 9 min read
  • 5 sections

Add a computer over SSH ​

Unmerged preview work

This page describes behavior in open pull requests #2782 (install and join) and #2783 (update and remove), which are not yet in a release.

A server you reach over SSH can become a full Octant computer, a spoke of your hub, without you sitting at it. Octant installs its signed headless build over your SSH connection, starts it as a user service, turns on its private listener, and joins it to the hub. The same row in Settings later updates it or removes Octant from it.

If you want to keep the server without Octant and only work in a folder there, use a server Project instead.

Before you start ​

  • [ ] You do this from the hub's window, or from a device you paired with the hub yourself. A computer that is only a member refuses with a sentence, and so does a computer with no hub.
  • [ ] The server is registered in Settings → Permissions → Servers, and you connected to it once yourself with ssh, so its host key is known. See Projects on your servers.
  • [ ] The server runs macOS on Apple Silicon, or Linux on x64 or arm64. Windows and other systems are refused.
  • [ ] On Linux, the server has bubblewrap and lsof, which a stock Ubuntu install lacks (sudo apt-get install -y bubblewrap lsof); see Install a headless artifact. Octant does not install them.
  • [ ] On any server, Bun 1.4.4 or later is on PATH, until open pull request #2724 is in a release; after it, the build carries its own Bun.
  • [ ] The server has a Tailscale or private network address. A server without one is refused, with a link to the private network guide.
  • [ ] This computer can reach Octant's update feed, or the signed headless build is already in place on this computer (below).

Where the build comes from ​

Unmerged preview work

Downloading the build from the release ring is in open pull request #2790, which is not yet in a release. Without it, place the build by hand as described below.

When no suitable build is on this computer, Octant downloads the one for the server's system from this computer's update ring, through the same signed feed the app's own updates use, and shows Download, Verify and Ready on the sheet. The server itself never contacts the release host.

To work offline, or to use a build you have, put the signed release build, octant-<version>-<target>.tar.gz, in the headless-builds folder inside this computer's Octant data folder (see Data directory). A build placed there is used, and the ring is not asked, when it is at least as new as the ring's. If the ring cannot be reached, the sheet says where to place a build.

Octant checks the build's release signature and every file's digest on this computer before anything is sent. A build that is unsigned, signed by a key not trusted for its release ring, or whose files do not match its manifest is refused. It is checked again when you confirm, and a build that changed in between is refused.

Make this an Octant computer ​

Only a window on this computer or a device you paired yourself may do this. A device the hub introduced, an agent's access grant and a routine are refused before anything is read.

  1. Open Settings → Permissions → Servers and expand the server's row.
  2. Choose Make this an Octant computer. Octant reads the server over its own SSH connection and changes nothing yet.
  3. Read the sheet (below), pick the address under Listens on, and choose Install and join, or Cancel.

What the sheet states ​

  • the server, its login, and its system as uname -sm reports it;
  • the exact Octant version and release ring, and that its signature and every file were checked on this computer;
  • where it installs: an install folder in the login's own state folder. Octant never uses sudo;
  • that it runs as a user service of that login: a systemd user service on Linux, a launchd agent on a Mac;
  • on Linux, the one administrator command for starting at boot (below);
  • the server's private addresses, Tailscale first, for Listens on. The listener uses port 8443 and the certificate Octant makes itself;
  • that it joins this computer's hub, and that Install and join also approves that one join.

The steps ​

Your one confirmation runs six steps over the same SSH connection. Each shows Waiting, Running…, Done, Failed with what to fix, or Not run. Nothing runs after a step that fails.

  1. Copy the build. The server reports the copy's digest, which must match the one checked here.
  2. Verify it on the server. The manifest and signature on the server must be the very files checked here.
  3. Install. The build's own octant server install checks the signature again and installs it.
  4. Start the service. octant server enable, then octant server start.
  5. Turn on the listener on the address you picked, at port 8443.
  6. Join the hub. The hub makes a join code for this one join and sends it to the server over the connection, never on a command line and never in the journal. The join uses the default hub grant (Roster, Introduce, Owners). Octant reads the server's comparison code over SSH and approves the join only when it matches the one the hub sees. A join whose code differs is denied and the step fails.

No credential of this computer is copied to the server. The request and each step are recorded in this computer's journal with you, or the device you used, as the actor, never a join code or key.

Start at boot on Linux ​

A user service runs while its login has a session. To have it start at boot with no one logged in, run the one administrator command the sheet shows on the server yourself:

sh
sudo loginctl enable-linger <login>

The sheet has a Copy button for it, and does not show it when the login already lingers. Octant never runs it for you. On a Mac, starting at boot with no one logged in is not available this way yet; the sheet says so.

Update an Octant computer ​

A server this computer made an Octant computer reads Octant computer, version <v> under its open row, and offers Update and Remove Octant in place of Make this an Octant computer. The same people may use them.

Choose Update. Octant downloads a newer build from the ring when the headless-builds folder holds none. Octant reads the installed version over SSH and changes nothing yet. It refuses a server the hub no longer lists as a member, a build that is not newer, and an unsigned or untrusted build.

The sheet states both versions and the ring, the signature check, how running turns are handled, any store migration, and what makes Octant roll back. Choose how running turns are handled:

  • Stop now: the member stops at once. Turns it cuts off carry on by themselves once the new version starts, except in the cases that hold a turn after any restart (for example, continuing after a restart is off, a tool's outcome is unknown, or the provider cannot resume); those wait for you, as listed in Threads and runs.
  • Wait up to N minutes for running work (from 1 to 60, 10 by default): the member stops taking new turns, which are refused with "This computer is about to update", and waits for running turns to finish before it stops. Turns still running when the time is up are stopped and carry on after the update, with the same exceptions.

Unmerged preview work

Waiting for running work is in open pull request #2792, which is not yet in a release. Without it, only Stop now is offered.

Then choose Update to <v> to run:

  1. Copy the build and Verify it on the server, as for an install.
  2. Drain running turns. With Wait, the member waits as chosen, then stops; with Stop now, it stops at once. If this step fails, the update rolls back and the member takes new turns again.
  3. Swap to <v>. The installed copy's octant server upgrade stages the new version, backs up the store first when it migrates, swaps, and starts it. If the new version fails its health checks, the upgrade puts the previous one back itself.
  4. Confirm its signed hello. The hub asks the member for its signed hello and believes it only when it is signed by the key the hub admitted the member with, names the new version, and covers this computer's protocol.

Roll back ​

If the swap fails with the previous version still in place, or the hello does not come within two minutes, is not signed by the member's key, names another version, or does not cover this computer, a Roll back to <v> step points the install at the previous version again, starts it, and deletes the refused version so you can try again. The sheet says why it rolled back.

Octant does not roll back a swap whose store was migrated, because it never starts an older build on a migrated store. It names the backup instead, for you to restore on the server.

Remove Octant ​

Choose Remove Octant. The sheet says what is deleted and what is kept:

  • Deleted: the user service and the install folder.
  • Kept: the data folder, with that computer's threads, settings and keys. The server also stays registered on this computer.

Tick Also delete the data folder to move it from Kept to Deleted. It is unticked by default, and the sheet warns "This cannot be undone." Then choose Remove Octant (or Remove Octant and its data) to run:

  1. Leave the hub. If the member cannot leave, for example because its service is stopped, the hub removes it from its roster instead.
  2. Stop and remove the service.
  3. Delete the install, and the data folder only if you ticked it. Octant deletes only the exact data folder the sheet named.

You can update or remove only a server this computer installed. A server installed from another computer, or whose install record is gone, does not offer these.

Next steps ​

Octant documentation · local-first by design