---
title: Daytona
description: Run captured command lines in an existing Daytona sandbox.
icon: /images/daytona-logo.svg
---

`DaytonaRuntime` connects to a live [Daytona](https://www.daytona.io)
sandbox by id. Create and size it with Daytona's dashboard, CLI, or SDK, then
boot it from an image or snapshot carrying Mirage and `fuse3`. Mirage only
connects and executes; it never creates, starts, stops, or deletes the sandbox.

See the [Sandbox overview](/typescript/runtime/sandbox) for the shared image and
how to provision the workspace at matching mount prefixes inside the sandbox.
The in-sandbox mount is served by the Python Mirage build for both SDKs.

## Install

```bash
pnpm add @daytonaio/sdk
```

## Configure

```yaml
runtimes:
  - name: daytona
    captures: ["python3", "pip"]
    config:
      sandboxId: ${DAYTONA_SANDBOX_ID}
      apiKey: ${DAYTONA_API_KEY}
  - vfs
```

`apiKey` is optional when `DAYTONA_API_KEY` is set. The runtime connects on the
first captured line and reuses that client until the workspace closes. Closing
the workspace releases the client and leaves the sandbox running.

The same configuration in application code is:

```ts
import { DaytonaRuntime } from '@struktoai/mirage-node'

const runtime = new DaytonaRuntime({
  captures: ['python3', 'pip'],
  config: { sandboxId: 'sandbox-id' },
})
```

Sizing, GPUs, snapshots, networking, and lifecycle controls such as idle-stop
or auto-delete remain Daytona settings.

<Warning>
  Mirage timeouts stop waiting but Daytona defaults to no provider-side
  timeout. The remote process can keep running and billing until you stop it.
  See [Resource limits](/typescript/runtime/sandbox#resource-limits).
</Warning>
