Skip to content

Sandboxes and resources

View as Markdown

This page documents the following commands. Global flags that apply to every command are listed under daytona.

CommandDescription
daytona cpu-typeInspect the CPU type catalog
daytona imageManage images
daytona mac-modelInspect the Mac model catalog
daytona regionInspect regions
daytona reservationReserve dedicated Macs for macOS sandboxes
daytona sandboxCreate and operate sandboxes
daytona snapshotManage snapshots

Inspect the CPU type catalog

Commands

CommandDescription
daytona cpu-type listList CPU types

List CPU types

List CPU types from the CPU catalog.

With —region, also show which types have a live runner in that region: AVAILABLE is “exact” when a runner declares the type, “fallback” when a higher tier of the same architecture serves it, and ”-” when nothing does.

Terminal window
daytona cpu-type list [flags]

Examples

Terminal window
daytona cpu-type list
daytona cpu-type list --region us-west-1

Flags

LongShortTypeDefaultDescription
--regionstringregion slug: show availability from GET /cpu-catalog

Manage images

Examples

Terminal window
daytona image list --all

Commands

CommandDescription
daytona image buildBuild an image from a Dockerfile context
daytona image captureCapture a sandbox filesystem as an image
daytona image createImport an image from a registry ref
daytona image deleteDelete an image
daytona image getGet one image
daytona image listList images
daytona image logsRead image build logs
daytona image promoteName an anonymous image, making it permanent

Build an image from a Dockerfile context

Terminal window
daytona image build <name> [flags]

Examples

Terminal window
daytona image build my-base --dockerfile Dockerfile --context .

Flags

LongShortTypeDefaultDescription
--contextstringpath to the build context tar or directory
--dockerfilestringpath to the Dockerfile inside the context

Capture a sandbox filesystem as an image

Capture only a sandbox disk as an image. Linux images have kind disk; Windows images have kind block. For memory capture, use daytona snapshot create. A macOS sandbox must be persistent and stopped; it cannot start until the snapshot is ready.

Terminal window
daytona image capture <sandbox> [flags]

Examples

Terminal window
daytona image capture <sandbox> --name saved-image
daytona image capture <sandbox> --idle 3600

Flags

LongShortTypeDefaultDescription
--idleintidle-retention window in seconds for an anonymous capture: deleted once this long passes without a sandbox being created from it (omit or -1 = server max, 7 days by default; promote the image to keep it)
--namestringimage name

Import an image from a registry ref

Terminal window
daytona image create <name> [flags]

Aliases: import

Examples

Terminal window
daytona image create my-base --ref python:3.12

Flags

LongShortTypeDefaultDescription
--refstringregistry ref to import

Delete an image

Terminal window
daytona image delete <id>

Examples

Terminal window
daytona image delete <id> --yes

Get one image

Terminal window
daytona image get <id>

Examples

Terminal window
daytona image get <id>

List images

—platform true lists the platform images every project can boot; —platform any adds them to the project’s own.

Terminal window
daytona image list [flags]

Examples

Terminal window
daytona image list --limit 20
daytona image list --platform true

Flags

LongShortTypeDefaultDescription
--allboolfollow every page until exhausted
--anonymousstringfilter by anonymous status: true|false|any
--cursorstringopaque continuation token
--limitint100max rows to return
--namestringfilter by exact image name
--platformstringplatform images: true (only platform images)|false (only the project’s, the default)|any (both)
--sandboxstringfilter captures by source sandbox id

Read image build logs

Terminal window
daytona image logs <id> [flags]

Examples

Terminal window
daytona image logs <id> --follow

Flags

LongShortTypeDefaultDescription
--followboolfollow until the build finishes

Name an anonymous image, making it permanent

Name an anonymous image, making it permanent (PATCH /images/{id}). Promotion only: an image that already has a name answers 409 — renaming a named image is not offered.

Terminal window
daytona image promote <image> <name>

Examples

Terminal window
daytona image promote img_abc123 saved-image

Inspect the Mac model catalog

Commands

CommandDescription
daytona mac-model listList registered Mac models

List registered Mac models

With —region, also show how many Macs of each model a purchase can reserve now (AVAILABLE) and the price of one Mac-hour and one 24-hour period.

Terminal window
daytona mac-model list [flags]

Examples

Terminal window
daytona mac-model list
daytona mac-model list --region macos-1

Flags

LongShortTypeDefaultDescription
--regionRregion slug: also show free Macs and prices from GET /mac-catalog

Inspect regions

Commands

CommandDescription
daytona region listList regions

List regions

List your regions at every level, parents before their children. AVAILABLE says whether a create can name the region.

Terminal window
daytona region list

Examples

Terminal window
daytona region list

Reserve dedicated Macs for macOS sandboxes

A reservation is one named Mac model, paid per 24-hour period.

Examples

Terminal window
daytona mac-model list
daytona reservation create --region macos-1 --model m4pro-12c-24g --idempotency-key nightly-mac
daytona reservation create --region macos-1 --count 3
daytona reservation get RESERVATION_ID
daytona reservation list
daytona reservation renew RESERVATION_ID
daytona reservation update RESERVATION_ID --auto-renew=false

Commands

CommandDescription
daytona reservation createReserve a Mac
daytona reservation getGet one Mac reservation
daytona reservation listList Mac reservations
daytona reservation renewRenew a Mac reservation for another period
daytona reservation updateTurn a Mac reservation’s auto-renew on or off

Reserve a Mac

Reserve a Mac of one model in a region (POST /reservations). The SDK twin is reservations.create(…). With —count, reserve several Macs of one model in one request (POST /reservations/bulk). The SDK twin is reservations.createBulk(…). Without —model the region’s default model is reserved; an unavailable model is never upgraded to another one. Without —idempotency-key the CLI sends a fresh key; pass your own to retry without buying a second Mac.

Terminal window
daytona reservation create [flags]

Examples

Terminal window
daytona reservation create --region macos-1 --model m4pro-12c-24g --idempotency-key nightly-mac
daytona reservation create --region macos-1 --model m4pro-12c-24g --count 3 --idempotency-key nightly-macs
daytona reservation create --region macos-1 --count 5 --min-count 2
daytona reservation create --region macos-1 --model m4-10c-16g --count 3 --dry-run

Flags

LongShortTypeDefaultDescription
--auto-renewboolrenew while a sandbox is active; create-macos requires —reservation new
--countNhow many Macs to reserve, 1 to 100 (calls POST /reservations/bulk; default: one Mac through POST /reservations)
--dry-runboolprint the price and the free Macs from GET /mac-catalog and reserve nothing
--idempotency-keyKEYa retry with the same key returns the first reservation instead of buying another (default: a fresh key per invocation)
--layoutsplit|wholesplit runs up to two sandboxes on each Mac, whole runs one (default: the model’s default layout)
--min-countMthe fewest Macs to accept when fewer than —count are free (default: —count, all or nothing)
--modelMODELMac model slug from mac-model list (default: the region’s default model; no upgrade)

Get one Mac reservation

Get one Mac reservation (GET /reservations/{id}).

Terminal window
daytona reservation get ID

Examples

Terminal window
daytona reservation get RESERVATION_ID

List Mac reservations

List the organization’s Mac reservations, newest first: open ones and those ended in the last 30 days (GET /reservations).

Terminal window
daytona reservation list

Examples

Terminal window
daytona reservation list

Renew a Mac reservation for another period

Charge the next period of an active reservation (POST /reservations/{id}/renew); period_end moves out by one period on the same Mac. The SDK twin is reservations.renew(…). Without —idempotency-key the CLI sends a fresh key; pass your own to retry without paying for a second period.

Terminal window
daytona reservation renew ID [flags]

Examples

Terminal window
daytona reservation renew RESERVATION_ID --idempotency-key renew-RESERVATION_ID-2

Flags

LongShortTypeDefaultDescription
--idempotency-keyKEYa retry with the same key returns the reservation without charging another period (default: a fresh key per invocation)

Turn a Mac reservation’s auto-renew on or off

Turn auto-renew on or off (PATCH /reservations/{id}). An auto-renewing reservation renews near period_end only while a sandbox is in use on it; stopped and paused sandboxes do not renew it. With auto-renew off, the reservation ends at period_end.

Terminal window
daytona reservation update ID [flags]

Examples

Terminal window
daytona reservation update RESERVATION_ID --auto-renew=false
daytona reservation update RESERVATION_ID --auto-renew=true

Flags

LongShortTypeDefaultDescription
--auto-renewboolrenew near period_end while a sandbox is in use on the reservation; false lets it end at period_end

Create and operate sandboxes

Create sandboxes, inspect their lifecycle, and run toolbox commands through the sandbox toolbox proxy.

Commands

CommandDescription
daytona sandbox cpCopy files to or from a sandbox
daytona sandbox createCreate a sandbox from an image
daytona sandbox create-from-snapshotCreate a sandbox from a snapshot
daytona sandbox deleteDelete a sandbox
daytona sandbox dockerInspect Docker Engine inside a sandbox
daytona sandbox execRun a command inside a sandbox
daytona sandbox forkFork a sandbox
daytona sandbox getGet one sandbox
daytona sandbox listList sandboxes
daytona sandbox logsRead sandbox logs
daytona sandbox pausePause a sandbox
daytona sandbox portInspect sandbox ports
daytona sandbox preview-urlMint a preview URL
daytona sandbox processInspect and control sandbox processes
daytona sandbox resumeResume a sandbox
daytona sandbox searchSearch sandboxes across the all-region index
daytona sandbox sshOpen SSH through the sandbox gateway
daytona sandbox startStart a sandbox
daytona sandbox stopStop a sandbox
daytona sandbox updateUpdate sandbox labels or lifecycle
daytona sandbox usageRead sandbox usage
daytona sandbox waitWait for a sandbox status

Copy files to or from a sandbox

Copies one file over a pre-signed toolbox URL minted by the control plane (POST /vms/{id}/files/sign). With -r, destination handling matches POSIX cp -r: if the destination ends with / (or is an existing local directory on download), the source directory is copied into it as <dest>/<basename(src)>; otherwise the destination path is the new directory itself.

Terminal window
daytona sandbox cp <src> <dst> [flags]

Flags

LongShortTypeDefaultDescription
--recursive-rboolcopy a directory by uploading one tar archive, then extracting it remotely

Create a sandbox from an image

Create a Linux sandbox from an image (POST /sandboxes). The SDK twin is create([image], …). Without —image the sandbox boots the platform default image.

Terminal window
daytona sandbox create [flags]

Examples

Terminal window
daytona sandbox create
daytona sandbox create --image py312
daytona sandbox create --image py312 --name mate --wait 60 --create-ttl 3600

Flags

LongShortTypeDefaultDescription
--allow-cidrstringArraynetwork policy: allowed IPv4 address or CIDR, any port (repeatable; needs —block-all or —allow-domain)
--allow-domainstringArraynetwork policy: allowed hostname or *.wildcard (repeatable; implies —block-all)
--block-allboolnetwork policy: deny all egress not explicitly allowed
--cpufloatguaranteed CPU cores
--cpu-archstringCPU architecture constraint
--cpu-typestringCPU type constraint
--create-ttlintdeadline in seconds for the sandbox to reach running (queued or booting) before the server deletes it (-1 = server max)
--diskint32scratch disk in MiB
--disk-maxint32scratch disk limit in MiB; equal to —disk for a fixed shape
--envstringArrayenvironment variable KEY=VALUE (repeatable)
--idempotency-keystringidempotency key
--idle-timeoutintidle seconds until —on-idle-timeout fires
--imagestringimage name or img_… id (default: the platform default image)
--labelstringArraylabel KEY=VALUE (repeatable)
--mem-maxint32memory limit in MiB; equal to —memory for a fixed shape
--memoryint32memory in MiB
--namestringsandbox name
--on-idle-timeoutstringaction when —idle-timeout elapses: stop|pause|delete
--on-timeoutstringaction when —timeout elapses: stop|pause|delete
--portstringArrayport as PORT or PORT/PROTO (repeatable)
--secretstringArraysecret name to attach (repeatable)
--spotbooluse the spot tier
--timeoutintwall-clock seconds until —on-timeout fires (re-arms on every start)
--userstringdefault sandbox OS user
--vcpusint32whole vCPU count
--vcpus-maxint32vCPU limit (boot shape and CPU ceiling); equal to —cpu for a fixed shape
--waitintserver-side wait budget in seconds before the create response returns
--wake-on-requestboolwake a parked sandbox on traffic

Create a sandbox from a snapshot

Create a Linux sandbox from a snapshot (POST /sandboxes/from-snapshot). The SDK twin is create_from_snapshot(snapshot, …). Resources come from the snapshot; only name, labels, ports, lifecycle, wait and create-ttl apply.

Terminal window
daytona sandbox create-from-snapshot <snapshot-name-or-snap_id> [flags]

Examples

Terminal window
daytona sandbox create-from-snapshot after-setup --name resumed

Flags

LongShortTypeDefaultDescription
--create-ttlintdeadline in seconds for the sandbox to reach running (queued or booting) before the server deletes it (-1 = server max)
--idempotency-keystringidempotency key
--idle-timeoutintidle seconds until —on-idle-timeout fires
--labelstringArraylabel KEY=VALUE (repeatable)
--namestringsandbox name
--on-idle-timeoutstringaction when —idle-timeout elapses: stop|pause|delete
--on-timeoutstringaction when —timeout elapses: stop|pause|delete
--portstringArrayport as PORT or PORT/PROTO (repeatable)
--timeoutintwall-clock seconds until —on-timeout fires (re-arms on every start)
--waitintserver-side wait budget in seconds before the create response returns
--wake-on-requestboolwake a parked sandbox on traffic

Delete a sandbox

Terminal window
daytona sandbox delete <id>

Examples

Terminal window
daytona sandbox delete <id>

Inspect Docker Engine inside a sandbox

Examples

Terminal window
daytona sandbox docker status <id>
daytona sandbox docker status <id> --wait

Commands

CommandDescription
daytona sandbox docker statusRead Docker Engine status inside a sandbox

Read Docker Engine status inside a sandbox

—wait polls until Docker is ready; if —timeout is not set, the command uses the SDK default wait budget of 60s.

Terminal window
daytona sandbox docker status <sandbox-id> [flags]

Flags

LongShortTypeDefaultDescription
--waitboolwait until Docker reaches ready

Run a command inside a sandbox

Starts a sandbox process through the toolbox proxy, streams its output, and exits with the process exit code.

Terminal window
daytona sandbox exec <sandbox-id> -- <command> [args...] [flags]

Examples

Terminal window
daytona sandbox exec sbx-123 -- python -V
printf hi | daytona sandbox exec sbx-123 -- cat
daytona sandbox exec sbx-123 --tty -- bash

Flags

LongShortTypeDefaultDescription
--cwdstringworking directory inside the sandbox
--envstringArrayenvironment variable to set (KEY=VALUE, repeatable)
--ttyboolrun the command in a PTY and attach interactively
--userstringsandbox OS user to run the command as

Fork a sandbox

Terminal window
daytona sandbox fork <id> [flags]

Examples

Terminal window
daytona sandbox fork <id>

Flags

LongShortTypeDefaultDescription
--namestringfork name

Get one sandbox

Get one sandbox by id.

Terminal window
daytona sandbox get <id>

Examples

Terminal window
daytona sandbox get <id>

List sandboxes

List sandboxes across regions.

Terminal window
daytona sandbox list [flags]

Examples

Terminal window
daytona sandbox list
daytona sandbox list --region us-west-1 --limit 20

Flags

LongShortTypeDefaultDescription
--allboolfollow every page until exhausted
--cursorstringopaque continuation token
--limitint100max rows to return

Read sandbox logs

Terminal window
daytona sandbox logs <id> [flags]

Examples

Terminal window
daytona sandbox logs <id>
daytona sandbox logs <id> --entrypoint

Flags

LongShortTypeDefaultDescription
--entrypointboolread entrypoint logs
--followboolpoll for new log bytes until interrupted

Pause a sandbox

Terminal window
daytona sandbox pause <id>

Examples

Terminal window
daytona sandbox pause <id>

Inspect sandbox ports

Commands

CommandDescription
daytona sandbox port listList listening ports inside a sandbox

List listening ports inside a sandbox

Terminal window
daytona sandbox port list <sandbox-id>

Mint a preview URL

Terminal window
daytona sandbox preview-url <id> <port> [flags]

Examples

Terminal window
daytona sandbox preview-url <id> 8080
daytona sandbox preview-url <id> 8080 --signed --ttl 300

Flags

LongShortTypeDefaultDescription
--signedboolmint a short-lived signed preview URL
--ttlint60signed preview TTL in seconds

Commands

CommandDescription
daytona sandbox preview-url expireExpire one signed preview URL

Expire one signed preview URL

Terminal window
daytona sandbox preview-url expire <id> <port> <token>

Examples

Terminal window
daytona sandbox preview-url expire <id> 8080 <token>

Inspect and control sandbox processes

Lists, gets, waits for, signals, kills, logs, and attaches to sandbox processes through the toolbox proxy.

Commands

CommandDescription
daytona sandbox process attachAttach to a process websocket stream
daytona sandbox process getFetch one process
daytona sandbox process killSend SIGKILL to a process
daytona sandbox process listList processes in a sandbox
daytona sandbox process logsRead process logs
daytona sandbox process signalSend a signal to a process
daytona sandbox process waitWait for a process to exit

Attach to a process websocket stream

Terminal window
daytona sandbox process attach <sandbox-id> <process-id> [flags]

Flags

LongShortTypeDefaultDescription
--cursorstringreplay from this cursor before the live stream

Fetch one process

Terminal window
daytona sandbox process get <sandbox-id> <process-id>

Send SIGKILL to a process

Terminal window
daytona sandbox process kill <sandbox-id> <process-id>

List processes in a sandbox

Terminal window
daytona sandbox process list <sandbox-id> [flags]

Flags

LongShortTypeDefaultDescription
--kindstringfilter by exec|pty|code|session
--namestringfilter by live name
--pidintfilter by OS pid
--session-idstringfilter by session id
--statestringfilter by running|terminal|all

Read process logs

Terminal window
daytona sandbox process logs <sandbox-id> <process-id> [flags]

Flags

LongShortTypeDefaultDescription
--cursorstringresume from this cursor
--encodingstringtextlog encoding: text|base64
--followboolfollow the log stream with SSE
--limitintmax frames to return

Send a signal to a process

Terminal window
daytona sandbox process signal <sandbox-id> <process-id> <signal> [flags]

Flags

LongShortTypeDefaultDescription
--escalate-afterstringescalate after this duration, e.g. 5s
--escalate-tostringsignal to escalate to, e.g. KILL

Wait for a process to exit

Terminal window
daytona sandbox process wait <sandbox-id> <process-id>

Resume a sandbox

Terminal window
daytona sandbox resume <id>

Examples

Terminal window
daytona sandbox resume <id>

Search sandboxes across the all-region index

The query is optional: filters alone select a set.

Terminal window
daytona sandbox search [query] [flags]

Examples

Terminal window
daytona sandbox search python
daytona sandbox search worker --status running --class linux --region us-west-1
daytona sandbox search --status running
daytona sandbox search 7fJk2mQpXv9dLc3RtY-use1

Flags

LongShortTypeDefaultDescription
--allboolfollow every page until exhausted
--classstringsfilter by class (repeatable or comma-separated)
--created-end-atstringexclusive creation-time upper bound (RFC3339)
--created-start-atstringinclusive creation-time lower bound (RFC3339)
--cursorstringopaque continuation token
--forked-fromstringfilter by source sandbox id
--id-prefixstringfilter by sandbox id prefix
--image-refstringfilter by exact image reference
--image-ref-prefixstringfilter by image reference prefix
--labelsstringfilter by labels JSON object
--last-activity-end-atstringexclusive activity-time upper bound (RFC3339)
--last-activity-start-atstringinclusive activity-time lower bound (RFC3339)
--limitint100max rows to return
--max-diskintmaximum disk in MiB
--max-memoryintmaximum memory in MiB
--max-vcpusintmaximum vCPU count
--min-diskintminimum disk in MiB
--min-memoryintminimum memory in MiB
--min-vcpusintminimum vCPU count
--name-prefixstringfilter by sandbox name prefix
--orderstringsort order
--sortstringsort field
--spotboolfilter by spot tier
--statusstringsfilter by status (queued|pending|assigned|booting|running|pausing|paused|stopping|stopped|deleting|deleted|failed|lost; repeatable or comma-separated)
--updated-end-atstringexclusive update-time upper bound (RFC3339)
--updated-start-atstringinclusive update-time lower bound (RFC3339)

Open SSH through the sandbox gateway

Execs the system ssh binary against the sandbox SSH gateway. Extra SSH flags are forwarded before the destination; any remaining arguments become the remote command.

Terminal window
daytona sandbox ssh <sandbox-id> [ssh-args...] [command]

Start a sandbox

Terminal window
daytona sandbox start <id>

Examples

Terminal window
daytona sandbox start <id>

Stop a sandbox

Terminal window
daytona sandbox stop <id>

Examples

Terminal window
daytona sandbox stop <id>

Update sandbox labels or lifecycle

Terminal window
daytona sandbox update <id> [flags]

Examples

Terminal window
daytona sandbox update <id> --label env=dev
daytona sandbox update <id> --idle-timeout 600 --on-idle-timeout stop

Flags

LongShortTypeDefaultDescription
--clear-labelsboolreplace the label set with {}
--idle-timeoutintidle seconds until —on-idle-timeout fires (-1 clears the pair)
--labelstringArrayreplacement label KEY=VALUE (repeatable)
--on-idle-timeoutstringaction when —idle-timeout elapses: stop|pause|delete
--on-timeoutstringaction when —timeout elapses: stop|pause|delete
--timeoutintwall-clock seconds until —on-timeout fires (re-anchors the deadline from now)
--wake-on-requestboolwake a parked sandbox on traffic

Read sandbox usage

Terminal window
daytona sandbox usage <id> [flags]

Examples

Terminal window
daytona sandbox usage <id>
daytona sandbox usage <id> --history

Flags

LongShortTypeDefaultDescription
--historyboolread usage history

Wait for a sandbox status

Terminal window
daytona sandbox wait <id> [flags]

Examples

Terminal window
daytona sandbox wait <id> --for running

Flags

LongShortTypeDefaultDescription
--forstringrunningstatus to wait for

Manage snapshots

Examples

Terminal window
daytona snapshot create <sandbox> --name before-upgrade
daytona snapshot list --all

Commands

CommandDescription
daytona snapshot createCreate a snapshot
daytona snapshot deleteDelete a snapshot
daytona snapshot getGet one snapshot
daytona snapshot listList snapshots

Create a snapshot

Create a memory snapshot. Linux creates a full snapshot with memory and disk; GPU creates a checkpoint; Windows and macOS are unsupported. For disk-only capture, use daytona image capture.

Terminal window
daytona snapshot create <sandbox> [flags]

Examples

Terminal window
daytona snapshot create <sandbox> --name before-upgrade

Flags

LongShortTypeDefaultDescription
--namestringsnapshot name

Delete a snapshot

Terminal window
daytona snapshot delete <id>

Examples

Terminal window
daytona snapshot delete <id> --yes

Get one snapshot

Terminal window
daytona snapshot get <id>

Examples

Terminal window
daytona snapshot get <id>

List snapshots

Terminal window
daytona snapshot list [flags]

Examples

Terminal window
daytona snapshot list --limit 20

Flags

LongShortTypeDefaultDescription
--allboolfollow every page until exhausted
--cursorstringopaque continuation token
--limitint100max rows to return