# ed memory deploy

> Chooses the machine that runs Memory, brings the stack up there, and remembers the choice so everything else knows where it lives.

- Canonical URL: https://getedith.pro/docs/cli/memory/deploy
- Updated: 2026-12-02

Chooses the machine that runs Memory, brings the stack up there, and
remembers the choice so everything else knows where it lives.

Usage:

```
ed memory deploy [<machine>] [--directory <path>] [--port <n>] [--adopt] [--json]
```

Options:

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--json` | flag | off | Emits one JSON document on stdout. |
| `--directory` | path | `~/edith-companion` | Where the stack runs on that machine. |
| `--port` | number | 4820 | Local port the API is reached on. |
| `--adopt` | flag | off | Records a stack that is already running without starting anything. |

With no machine argument it uses the one that already hosts the stack, or the
best candidate that can run it.

An explicit machine argument selects a remote registered machine by exact
case-insensitive name, UUID, or text contained in its SSH target. It does not
accept name prefixes and cannot explicitly select this Mac; omit the argument
when the local host is the recommended candidate.

Examples:

```
$ ed memory deploy "Build Server"
Memory running on Build Server, cpu, reached on port 4820

$ ed memory deploy "Build Server" --adopt
Memory running on Build Server, cpu, reached on port 4820
```

A machine that cannot run it yet is refused with the reason and the fix, so
nothing half-starts. The tier is derived from the Mac processor: Apple silicon
uses the Apple Metal overlay and Intel uses CPU.

Deploying creates the directory and copies the Memory stack into it on every
deploy. Compose runs through the runtime detected
on the host: `podman compose` on Podman, `docker compose` on Docker and Colima.

The CLI then overwrites its carried Compose files and Dockerfile, writes `.env`
with mode controlled by `umask 077`, and includes the current configuration and
Keychain secrets. `--port` must be positive and is written as the API port as
well as saved for endpoint resolution. The stack starts with `up -d --build`.
The deployment record is saved only after that command succeeds.

For a remote host, deploy reuses or creates a forward from the chosen local
port to the same remote port. A tunnel failure is a note, not a failed deploy,
so run `ed machines forwards on <machine>` yourself if status cannot connect.
The CLI does not wait for `/v1/health` before returning; use
[`ed memory doctor`](https://getedith.pro/docs/cli/memory/doctor) to verify the completed startup.

`--adopt` skips installation, `.env` writes, Compose startup and tunnel setup.
It only saves the selected host, directory, tier and port. Before adopting, the
CLI accepts either a host that passes readiness or one whose Compose service
list is already nonempty. It does not verify API health.

`--json` emits the saved deployment object:
`{machineName,isLocal,directory,tier,localPort,endpoint,deployedAt}`. Progress
notes from a real deploy remain on stderr.

## Where to go next

- [`ed memory hosts`](https://getedith.pro/docs/cli/memory/hosts) shows the candidates first.
- [`ed memory stack`](https://getedith.pro/docs/cli/memory/stack) drives it once it is deployed.

- [`ed memory`](https://getedith.pro/docs/cli/memory), the rest of this group
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
