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

# Create, find, start, and stop a Computer

> Manage persistent Linux Computers by stable ID, check persistent_computers limits, and distinguish stopping work from deleting disks.

A Deepest **Computer** is a persistent Linux environment with a stable product ID. **Create** allocates a Computer; **Stop** ends running processes and frees running Memory while preserving its disk; **Start** cold-boots that same disk again; **Delete** permanently removes the Computer, its disk, attached snapshots, and SSH authorizations.

Use a Computer for repositories, installed toolchains, long-running services, SSH/IDE workflows, or Desktop sessions. For bounded headless tasks within 24 hours, consider a [Sandbox](https://docs.deepest.dev/sandboxes/overview.md).

## Check resources and Computer count limits

Before creating a new Computer, verify active entitlement, available Memory (at least 256 MiB, in 256 MiB increments), Storage status, and your Account's `persistent_computers` limit (**50 / 500 / 1,000 / 1,000** across Starter / Pro / Max 16 / Max 32):

* **Stopped Computers still count** toward `persistent_computers` (as do reserved and pending Computers).
* **Clone** creates a new Computer and consumes a slot; **Start, Stop, Resize, Snapshot, and Restore** do not.
* Confirmed **Delete** frees the slot. Sandboxes do not count toward `persistent_computers`.

List existing Computers first and reuse an existing Computer when it matches the workspace. In the Console, open **Machines → Create Machine**, select **Computer** and **Memory**, and click **Create and start** once (or **Set up manually → Create Computer** on Home).

## Create and verify via the SDK

Install [`@deepest/sdk`](https://docs.deepest.dev/api-and-sdk/typescript) and save one unique `DEEPEST_CREATE_KEY` alongside your chosen `ram_mib` before calling `computers.create()`. Keep the same key and Memory request if recovery is needed—never generate a fresh random key on retry.

```js theme={null}
import { Deepest } from "@deepest/sdk";

const deepest = new Deepest({
  baseUrl: process.env.DEEPEST_API_URL,
  apiKey: process.env.DEEPEST_API_KEY,
});

const pool = await deepest.resources.get();
const existing = await deepest.computers.list();
if (!pool.ok || !existing.ok) throw new Error("Inspect failed resource/list check.");
console.table(existing.result);

const ram_mib = 512; // Workload choice in 256 MiB steps, not a plan limit.
if (pool.result.entitlement.status !== "active") {
  throw new Error("Account has no active compute entitlement.");
}
if (pool.result.ram_limit_mib - pool.result.ram_used_mib < ram_mib) {
  throw new Error("Insufficient available running Memory in pool.");
}

const created = await deepest.computers.create({
  idempotency_key: process.env.DEEPEST_CREATE_KEY,
  ram_mib,
});
if (!created.ok) throw new Error(`${created.error.code} (${created.retry})`);
console.log("Created:", created.result.id, created.result.state);
```

Save the returned `id`—every subsequent operation targets that ID. Confirm `state === "running"` and run a quick check before assuming Linux is ready:

```js theme={null}
const computer = deepest.computer(process.env.DEEPEST_COMPUTER_ID);
const current = await computer.get();
if (!current.ok || current.result.state !== "running") {
  throw new Error("Observe the original Computer until state is running.");
}

const check = await computer.exec({
  command: "sh",
  args: ["-lc", "printf 'Deepest Linux ready\\n'; uname -s; pwd"],
  timeout_ms: 10000,
});
if (!check.ok || check.result.timed_out || check.result.exit_code !== 0 || check.result.output_truncated) {
  throw new Error("Readiness command failed; inspect envelope and output.");
}
console.log(check.result.stdout);
```

`command` accepts an executable path or binary name; shell operators work above only because the example explicitly calls `sh -lc`. See [Commands](https://docs.deepest.dev/connect/commands.md).

## Rename without changing identity

Display names are human labels (up to 80 Unicode code points, trimmed; control characters rejected; empty clears the label). Renaming never changes the Computer's ID, disk, SSH authorizations, or lifecycle state—always target the stable ID in scripts and Agents.

```js theme={null}
const renamed = await computer.rename({ display_name: "Project development" });
if (!renamed.ok) throw new Error(renamed.error.code);
```

## Observed lifecycle states

| State | Meaning & next step |
| - | - |
| `running` | Ready for SSH, Exec, Preview, and Desktop checks |
| `stopped` | Disk preserved; running Memory released; still counts toward `persistent_computers`. Start to resume |
| `starting` | Startup in progress; query the same ID rather than creating a replacement |
| `draining` | Transition releasing the running instance; do not treat Memory as free until settled |
| `paused` | Still occupies running Memory (no public Pause/Hibernate API) |
| `unknown` | Unsettled observation; query the same ID before another mutation |

> [!NOTE]
>
> Both an `UNKNOWN` failure envelope and an observed `state: "unknown"` mean: inspect the **original** Computer ID rather than assuming it is missing or stopped.

## Stop and Start (cold boot)

Stop ends running processes, terminal sessions, and TCP connections while preserving the disk. Save application state and obtain authorization before stopping shared work.

```js theme={null}
const stopped = await computer.stop();
if (!stopped.ok || stopped.result.state !== "stopped") {
  throw new Error("Stop not yet confirmed; query the same Computer ID.");
}
```

When ready to resume, explicitly Start the same ID (`computer.start()`). Start is a **cold boot** from the retained disk: refresh your SSH endpoint or runtime URL and start any service not configured via systemd/boot scripts.

> [!TIP]
>
> Closing an SSH terminal or Desktop Viewer tab does **not** Stop a Computer, and Computers have no automatic idle auto-stop. Conversely, stopping a Computer immediately ends Viewer, Preview, and Share access.

## Choose the right operation

| Goal | Action | Effect |
| - | - | - |
| Pause work, keep files, free Memory | **Stop** | Same ID and disk; running processes end |
| Change Memory | [Resize](https://docs.deepest.dev/computers/resize.md) | Changes RAM only; inspect `disposition` |
| Save disk checkpoint | [Create snapshot](https://docs.deepest.dev/computers/snapshots-and-restore.md) | Source must be stopped; disk-only (no RAM/processes) |
| Roll back disk to checkpoint | [Restore](https://docs.deepest.dev/computers/snapshots-and-restore.md) | Overwrites later disk changes and boots same Computer |
| Create independent copy | [Clone](https://docs.deepest.dev/computers/clone.md) | Stopped source, new ID, consumes `persistent_computers` slot |
| Free deleted file blocks | [Storage Reclaim](https://docs.deepest.dev/computers/storage-reclaim.md) | Stopped Computer; keeps files and snapshots |
| Permanently discard workspace | **Delete** | Removes disk, attached snapshots, and frees Computer slot |

## Delete only the exact intended Computer

Deletion is irreversible and frees the Computer's `persistent_computers` slot. Export needed files and review attached snapshots (`snapshots.list()`) first, then delete and verify absence (`NOT_FOUND`):

```js theme={null}
const deleted = await computer.delete();
if (!deleted.ok) throw new Error(`${deleted.error.code} (${deleted.retry})`);

const check = await computer.get();
if (check.ok || check.error.code !== "NOT_FOUND") {
  throw new Error("Deletion not yet confirmed absent; query the original ID.");
}
```

If `delete()` returns `RESOURCE_CONFLICT`, some attached snapshots may already have been deleted while a remaining dependency prevented completion—inspect remaining snapshots and resolve authorized dependencies rather than expecting rollback.

## Failure and recovery

| Code | Recovery |
| - | - |
| `ENTITLEMENT_REQUIRED` | Read `resources.get()` and restore active entitlement; signing in alone grants no compute |
| `LIMIT_EXCEEDED` | Inspect `error.limit.dimension`: `memory` (free RAM), `persistent_computers` (Delete unused Computers—Stop keeps the slot), or `reserved_intents` |
| `STORAGE_LIMIT_EXCEEDED` | Clean disposable files/snapshots and run Storage Reclaim; Stop alone keeps disk usage |
| `IDEMPOTENCY_CONFLICT` | Reused creation key with changed payload; recover the original intent |
| `NOT_RUNNING` | Explicitly Start the Computer if appropriate |
| `LIFECYCLE_BUSY` / `RUNTIME_UNAVAILABLE` (`retry: "safe"`) | Wait `error.retry_after_seconds` (when 429) or for capacity clearance, then retry explicitly with original key |
| `UNKNOWN` (`retry: "query-first"`) | Query the original ID (or list and reuse original `idempotency_key` for Create) before mutating again |

For shared retry timing and error rules, see [Errors](https://docs.deepest.dev/api-and-sdk/errors.md) and [Reliability and recovery](https://docs.deepest.dev/api-and-sdk/reliability.md).

## Entitlement expiry and retention

Computers have no 24-hour Sandbox TTL. When Account entitlement expires, running Computers stop and enter the **30-day retention period**. Restoring entitlement within 30 days keeps the original Computer ID and disk intact without auto-starting it. Keep external backups of critical data—on-platform disk snapshots are not off-node disaster recovery.


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