Skip to main content
By the end of this guide you can run more than one Reliant daemon on one computer, for example one per checkout or one for each of two accounts, and check, read or stop any of them from any directory. Each daemon is an instance, named by three things: the server it talks to, the account it runs as, and the workspace it serves. Every combination gets its own folder under ~/.reliant/instances/<server>/<account>/<workspace>/, with its runtime record, its daemon id and its logs (one daemon per workspace). Each instance connects as a separate machine.

Before you begin

1

See which instance a directory maps to

The workspace defaults to the git worktree root of the current directory, so status answers for a different instance in each checkout:
terminal
terminal
The first was run from a subdirectory and still names repo-a. _default is the account segment before you use more than one account. Outside a git checkout, the workspace is the current directory itself. status only looks: it creates nothing, and it exits 1 until a daemon’s stream is connected.
2

Start a daemon for another checkout

terminal
The credential in ~/.reliant/daemon.json belongs to an account, not to a checkout, so the new instance uses it and saves a daemon id of its own. The machine appears in Settings → Machines under the --name you gave it. Each daemon runs in the foreground: give each one its own terminal, tmux window or service unit (run the daemon on your own server).
3

Start a daemon for a second account

Name the account, by user id, on every command for that daemon. reliant auth status shows the account of a reliant auth login made by a recent release:
terminal
An account with no stored credential pairs first. Approve the code while signed in to the app as that account. With --token, the daemon runs as whichever account the pasted token belongs to. Without either, the most recently connected account is used. When you are signed in with reliant auth login, daemon start passes over another account’s stored credential and pairs the computer as you instead. Two accounts can run side by side, even in the same checkout:
terminal
4

List every instance

terminal
Here three daemons have started, none of them signed in yet:
terminal
RUNNING comes from a lock the operating system releases when the process dies, so it can’t be stale. A daemon takes that lock once it has a credential and starts serving, so a daemon still signing in shows -. A connected one looks like this:
terminal
5

Check, read or stop any instance from anywhere

status, logs and stop take the same --workspace, --account and --server as start, so you can address any instance from any directory:
terminal
terminal
stop waits for the process to exit and exits 0 once it has. A different --server is a different instance too: --server http://localhost:8080 gives a record under http-localhost-8080-a76d8c3e/.
6

Check that each daemon is connected

Run reliant daemon status for each instance. It exits 0 only when that daemon’s stream is established and stable, and each one shows as a connected machine in Settings → Machines.

What this does not do

  • A workspace isn’t a sandbox. It names the instance. Every daemon runs as your Unix user, and an agent’s shell command can reach whatever that user can (daemon security model).
  • Accounts that share a Unix user share its files. Both accounts’ credentials are in the same ~/.reliant/daemon.json, and an agent’s shell command under either daemon can read it. Give two people separate Unix users, not separate --account daemons.
  • A daemon that is still signing in doesn’t block a second start in the same instance, because it hasn’t taken the lock yet. Stop it with reliant daemon stop before you start another there.

Next steps

Run a machine from the CLI

Start, check, read logs and stop a daemon, with a systemd unit.

Fix an offline machine

Read the stream state and re-register a refused credential.

Daemon security model

Instance identity, daemon.json and what a command can reach.

Reclaim and restore worktrees

Free the disk each machine’s worktrees hold.