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

# Connect a machine

> Run ade connect to put a machine on your ADE account — then reach it from desktop, the web, and iOS. Includes running the ADE brain headless on a Linux server.

ADE's engine is the **brain** — an always-on, machine-owned process that holds your projects, lanes, agent chats, and Git state. The desktop app, the web client, and the iOS app are all *clients* of a brain.

That split is what makes this possible: install the brain on a machine, connect it to your account, and drive it from anywhere. A Linux build server with 64 cores can be the machine that runs your agents while you review diffs from your phone.

## `ade connect`

`ade connect` is the one command that puts a machine on your account. It runs three idempotent steps and reports each one:

**1. Account**

Reuses a valid session, or signs you in. A machine with a browser opens it, and also prints a QR code, a link, and a short code, so you can finish on your phone or on a different computer instead. SSH sessions and display-less hosts print only the QR code, the link, and the code.

**2. Service**

Installs and starts this platform's login service if it is not already running — launchd on macOS, a systemd user service on Linux, a per-user startup entry on Windows. None of them need an elevated shell.

**3. Machine**

Waits for this machine's row to reach your account directory. Once it lands, the machine is reachable from ADE desktop, the [web client](https://app.ade-app.dev), and iOS.

```bash theme={null}
ade connect                  # sign in, install the service, publish this machine
ade connect --status --text  # report the three steps, change nothing
ade connect --headless       # sign in from another device only: QR code, link, and code
ade connect --no-login       # service only — stay local and LAN-only
ade connect --no-service     # account only — do not install the login service
ade connect --timeout 120    # seconds to wait for the machine row (default 60)
```

Re-running `ade connect` on an already-connected machine changes nothing and just prints status, so it is safe in a provisioning script.

> [!NOTE]
>
> Output is JSON by default so scripts and agents can consume it. Add `--text` for a human-readable summary.

> [!WARNING]
>
> The brain is what publishes the machine and keeps it reachable — it re-registers every 30 seconds while running. If you skip the service step with `--no-service`, or stop the brain, the machine goes offline in the directory. The account directory marks a machine `online` only within a 90-second window of its last heartbeat.

## The brain on a Linux server

Linux runs the brain, not a desktop app — and that is the point. There is no ADE desktop app for Linux, and none is needed.

**1. Install the brain**

On any x64 or arm64 Linux box:

```bash theme={null}
curl -fsSL https://ade-app.dev/install.sh | sh
```

The script downloads a self-contained runtime binary, verifies it against the published checksums, and installs it under `~/.ade`. There is no Node or npm prerequisite. Add `~/.ade/bin` to your `PATH` — the installer prints the line but does not edit your shell profile.

The systemd user service is registered only when a systemd user session is available. On a box without one, start the brain yourself and keep it running.

**2. Connect it**

Over SSH there is no browser, so sign in from another device:

```bash theme={null}
ade connect --headless
```

The CLI prints a QR code, a verification URL, and a short code. Scan the QR code with your phone, or open the URL in a browser on any device and enter the code. The server signs in when you finish, and your password is never typed on the server. If ADE Mobile is on the phone and signed in, the scan opens the app: tap **Approve**, then **Allow**.

**3. Open a project on it**

Register a repository that lives on that box:

```bash theme={null}
ade init          # add the current directory as a project
ade projects list --text
```

**4. Drive it from anywhere**

The machine now appears in ADE desktop, at [app.ade-app.dev](https://app.ade-app.dev), and in the iOS app. Create lanes, run agents, review diffs, and merge PRs from any of them — the work executes on the Linux box, against its filesystem and its own GitHub, Linear, and provider credentials.

## Non-interactive hosts

For CI and unattended agents, do the interactive sign-in once on a machine that has a browser, mint a durable credential, and hand it to the headless host:

```bash theme={null}
ade account token create
```

Store the result in your secret manager and expose it as `ADE_ACCOUNT_TOKEN` to the ADE brain or runtime on the target machine. ADE never logs this value.

The install scripts detect that no terminal is attached and skip their prompts, printing the follow-up commands instead. Set `ADE_INSTALL_NO_PROMPT=1` (or pass `-NoPrompt` to `install.ps1`) to opt out explicitly.

## Undoing it

```bash theme={null}
ade logout                      # sign out — undoes the account half of connect
ade runtime uninstall-service   # remove the login service
```

The desktop app, the web client, and the iOS app need an account. The brain does not: local `ade` CLI, project, and lane workflows keep working on the machine while it is signed out, and `ade connect --no-login` installs the service with no account.

## Remote machines over SSH, instead

`ade connect` publishes a machine to your account so any client can reach it. If you would rather not involve an account at all, a desktop window can bind directly to a brain on another machine over SSH — ADE bootstraps the runtime on the far side on first connect.

> [card] [Remote machines](https://ade-app.dev/docs/tools/remote-machines.md)
>
> Drive a repository on another box over SSH, with the desktop as the control plane.

> [card] [ade CLI](https://ade-app.dev/docs/reference/cli.md)
>
> The full typed control plane, including every `ade connect` flag.


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