> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reliantlabs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Run the Reliant daemon headless on a server or Raspberry Pi

> Turn a Linux server or 64-bit Raspberry Pi into an always-on machine for AI coding agents: connect it with an access token and keep it up with systemd.

A home server, a cloud VM or a Raspberry Pi can be a self-hosted machine for AI coding agents that stays on when your laptop is closed. This guide connects one that has no browser and keeps its daemon running across reboots.

[Connect your computer](https://docs.reliantlabs.io/guides/machines/connect-computer-as-machine.md) pairs a machine with a code you approve, and that also works over SSH. This guide uses an access token instead, so the server never waits on a person.

## Before you begin

* A Linux server, x86\_64 or 64-bit ARM. On a Raspberry Pi, that means a 64-bit OS: `uname -m` must print `aarch64`. There is no 32-bit ARM build.
* The `reliant` CLI on the server. The Linux `.deb` package puts it at `/usr/bin/reliant` ([Installation](https://docs.reliantlabs.io/getting-started/installation.md)).
* A git repository on the server for agents to work in, for example `~/src/my-service`.
* systemd. The daemon runs in the foreground and never detaches itself, so a service manager keeps it up.

**1. Create a daemon token in the app**

In the app, open **Settings → Access tokens**, click **New token**, name it after the server and click **Create**. Copy the `rlat_…` token: it is shown once.

This must be a token from that page. A token from `reliant auth token create` acts on the API as you, but it cannot connect a daemon, and the gateway refuses it (see Troubleshooting).

**2. Give the token to the daemon once**

On the server, from the repository, start the daemon with `--token` and paste the token at the prompt. `--name` is the name the app shows.

```bash terminal theme={null}
cd ~/src/my-service
reliant daemon start --token --name guides-sandbox-server
```

```text terminal theme={null}
Paste your access token:
```

The daemon asks Reliant which account the token belongs to, saves it to `~/.reliant/daemon.json` and connects. Anything that is not an `rlat_` token is refused before anything is saved:

```text terminal theme={null}
invalid token format (expected an rlat_ daemon token)
```

When `reliant daemon status` in a second terminal reports the stream as established, stop this daemon with Ctrl+C. Later starts reuse the saved token.

> [!TIP]
>
> For a scripted install, pipe the token instead: `printf '%s\n' "$TOKEN" | reliant daemon start --token --name <name>`.

**3. Run it as a systemd user service**

Create the unit file. `WorkingDirectory` picks the repository the daemon serves.

```ini ~/.config/systemd/user/reliant-daemon.service theme={null}
[Unit]
Description=Reliant daemon (guides-sandbox-server)
Wants=network-online.target
After=network-online.target

[Service]
WorkingDirectory=%h/src/my-service
ExecStart=/usr/bin/reliant daemon start --non-interactive --name guides-sandbox-server
Restart=on-failure
RestartSec=10

[Install]
WantedBy=default.target
```

`--non-interactive` stops a restart from waiting on a pairing code nobody will see. If the credential is ever missing, the daemon stays up and waits for one to appear on disk. Use the path `command -v reliant` prints in `ExecStart`.

```bash terminal theme={null}
systemd-analyze verify ~/.config/systemd/user/reliant-daemon.service
systemctl --user daemon-reload
systemctl --user enable --now reliant-daemon
loginctl enable-linger "$USER"
```

`enable-linger` keeps your user services running after you log out and starts them at boot.

**4. Verify it is connected**

From the repository, `reliant daemon status` exits `0` only when the stream to Reliant is established and stable:

```bash terminal theme={null}
cd ~/src/my-service && reliant daemon status
```

A connected daemon starts with `Daemon is running and its gateway stream is established`. If the token did not get saved, you see this instead, with exit code `1`:

```text terminal theme={null}
Daemon is running but has no usable credentials — waiting for sign-in
  PID:      2143911
  Binary:   /opt/reliant/bin/reliant (built 2026-11-19T04:27:16Z, 27h7m40s ago)
  Stream:   awaiting_credentials for 12s
            never connected since this daemon started
  Error:    waiting for credentials to appear on disk
daemon gateway stream is not established (awaiting_credentials) — it can serve no tool calls
```

The machine also appears under **Settings → Machines**. Start a chat on it and ask the agent to run `uname -m`.

**5. Read its logs**

```bash terminal theme={null}
reliant daemon logs -n 200 --follow=false
journalctl --user -u reliant-daemon
```

`daemon logs` reads the end of the daemon's log, `tools-daemon.log`, in its instance folder under `~/.reliant/instances/`. It only looks at the last 1 MB, so grep that file for older history. `reliant daemon ls` lists every daemon instance on the server.

**6. Stop or remove the machine**

Stop the service, not the daemon: systemd would start a daemon you stopped by hand again.

```bash terminal theme={null}
systemctl --user disable --now reliant-daemon
```

To retire the server for good, also revoke its token under **Settings → Access tokens** and run `reliant auth logout` on the server to delete the saved credential. Then choose **Forget This Machine** under **Settings → Machines**. Forgetting removes only the connection record: a machine that reconnects reappears.

## What this does not do

* **No 32-bit ARM.** Release builds are for 64-bit Linux, macOS and Windows on x86\_64 and ARM64.
* **No sandbox by default.** The daemon runs as the user that owns the service, and an agent's commands can read whatever that user can. Run it as a dedicated user, and see [the daemon security model](https://docs.reliantlabs.io/deep-dives/daemon-security-model.md) for what `credentials: none` hides.
* **No inbound port, and no reach into your network beyond what the server has.** The daemon dials out; agents reach only what the server itself can reach ([how a tool call reaches your machine](https://docs.reliantlabs.io/deep-dives/how-tool-calls-reach-your-machine.md)).

## Troubleshooting

> [accordion] token rejected by gateway … (unauthenticated)
>
> The gateway refused the token, and nothing was saved. You get this when the token was revoked, or when it is not a daemon token. A `reliant auth token create` token gives exactly this:
>
> ```text terminal theme={null}
> token rejected by gateway https://gateway.reliantapi.com (default — no --gateway flag and no RELIANT_GATEWAY_URL) (unauthenticated) — verify the PAT is correct, not revoked, and was minted by https://api.reliantapi.com (default — no --server flag and no RELIANT_SERVER_URL)
> ```
>
> Create a token under **Settings → Access tokens** and run step 2 again.

> [accordion] awaiting\_credentials
>
> The service started before a credential was saved, or `reliant auth logout` removed it. Stop the service (`systemctl --user stop reliant-daemon`), run step 2 as the same user from the same repository, then start the service again.

> [accordion] The service stops when you log out
>
> Run `loginctl enable-linger "$USER"`. Without it, systemd stops your user services when your last session ends.

## Next steps

> [card] [Connect your computer](https://docs.reliantlabs.io/guides/machines/connect-computer-as-machine.md)
>
> Pair a machine with a code you approve in the app.

> [card] [Pin a workflow to a machine](https://docs.reliantlabs.io/guides/machines/pin-workflow-to-machine.md)
>
> Send a workflow's runs to this server.

> [card] [Troubleshoot an offline machine](https://docs.reliantlabs.io/guides/machines/troubleshoot-offline-machine.md)
>
> When a chat says the machine is offline.

> [card] [Run a machine from the terminal](https://docs.reliantlabs.io/cli/run-a-machine.md)
>
> Every status field, stop's rules, and several daemons on one computer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.