Daytona

App · Cloud Computing · 15 actions

Run code safely in Daytona sandboxes from a workflow: spin up an isolated computer in seconds, run Python, JavaScript, TypeScript or any command in it, move files in and out, clone a repository, share a preview link to an app running inside, and stop, archive or delete it when the job is done.

Actions

ActionWhat it does
Archive a sandboxMove a sandbox's files to cheaper storage, stopping it first if it is running.
Clone a Git repositoryCopy a Git repository into a sandbox, from GitHub, GitLab or any Git host, so later steps can build, test or read it.
Create a sandboxCreate a sandbox and wait until it is running, ready for code, commands and files.
Delete a sandboxDelete a sandbox and everything in it.
Download a fileGet a file out of a sandbox, such as a report or chart your code made, as a file later steps can send or store.
Get a preview linkA link anyone can open to see an app or site running in a sandbox, such as a web server started with 'Run a command'.
Get a sandboxOne sandbox: whether it is running, its resources, labels and when it stops or deletes itself.
List filesThe files and folders in one folder of a sandbox, folders first.
List sandboxesThe sandboxes in your organization, newest first, optionally only those in some states, with some labels or whose name starts a certain way.
Run a commandRun a shell command in a sandbox, such as installing a package or running tests, and get its output.
Run codeRun Python, JavaScript or TypeScript in a sandbox and get what it printed.
Start a sandboxStart a stopped or archived sandbox and wait until it is running.
Stop a sandboxStop a sandbox and wait until it has stopped.
Update a sandboxChange when a sandbox stops or deletes itself, or its labels.
Upload a filePut a file in a sandbox: upload one, use a file from an earlier step, or type its text.

Archive a sandbox

Move a sandbox's files to cheaper storage, stopping it first if it is running. Starting it later brings everything back. A large sandbox may still say 'archiving' when the step ends; Daytona finishes on its own.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

Outputs

auto_stop_minutesnumber
cpunumber
created_attext
delete_attext
delete_when_stoppedtrue/false
disk_gbnumber
error_reasontext
idtext
labelsobject
last_activity_attext
memory_gbnumber
nametext
regiontext
snapshottext
statetext
Example output
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "archived"
}

Clone a Git repository

Copy a Git repository into a sandbox, from GitHub, GitLab or any Git host, so later steps can build, test or read it.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
Repository URLurltextRequired
The repository's https address.
Clone into folderfoldertext
Where to put it in the sandbox. Leave blank to use the repository's name.
Branchbranchtext
Leave blank for the repository's default branch.
Access tokenaccess_tokentext
Only for a private repository: a token that can read it, such as a GitHub personal access token.
Usernameusernametext
Only if your Git host needs one with the token, as Bitbucket does. GitHub and GitLab don't.

Outputs

branchtext
foldertext
sandbox_idtext
urltext
Example output
{
  "branch": null,
  "folder": "Hello-World",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "url": "https://github.com/octocat/Hello-World.git"
}

Create a sandbox

Create a sandbox and wait until it is running, ready for code, commands and files. By default it stops after 15 idle minutes and keeps its files until you delete it.

Inputs

Namenametext
A name to find it by, unique in your organization. Leave blank and Daytona names it after its ID.
Snapshotsnapshottext
What the sandbox starts from. Leave blank for Daytona's default, with Python and Node.js, 1 CPU, 1 GB of memory and 3 GB of disk.
Stop when idle for (minutes)auto_stop_minutesnumber
Stop the sandbox after this many minutes with nothing happening in it, so it stops using compute. Its files are kept. 0 keeps it running. 15 if left blank.At least 0.
Delete when it stopsdelete_when_stoppedtrue/false
Delete the sandbox, files and all, as soon as it stops. Good for one-off jobs.Default: false.
Delete after (minutes)delete_after_minutesnumber
Delete the sandbox this many minutes after it is created, whatever it is doing. A safety net for jobs that might not clean up. Leave blank for no limit.At least 1.
Environment variablesenv_varsobject
Names and values every program in the sandbox can read. Names use letters, digits and underscores.
Labelslabelsobject
Tags to find the sandbox by later: 'List sandboxes' can filter by them.

Outputs

auto_stop_minutesnumber
cpunumber
created_attext
delete_attext
delete_when_stoppedtrue/false
disk_gbnumber
error_reasontext
idtext
labelsobject
last_activity_attext
memory_gbnumber
nametext
regiontext
snapshottext
statetext
Example output
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}

Delete a sandbox

Delete a sandbox and everything in it. This can't be undone. If it is starting or stopping, the step waits for that to finish.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

Outputs

deletedtrue/false
idtext
nametext
Example output
{
  "deleted": true,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "name": "report-builder"
}

Download a file

Get a file out of a sandbox, such as a report or chart your code made, as a file later steps can send or store. A text file up to 1 MB also comes back as 'text'.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
File pathpathtextRequired
The file's path in the sandbox, such as report.md. A path that doesn't start with / is inside the working folder.

Outputs

content_typetext
document_reftext
documentslist
download_urltext
filenametext
pathtext
sandbox_idtext
size_bytesnumber
texttext
Example output
{
  "content_type": "text/markdown",
  "document_ref": "doc_7f0c2b9e4a1d",
  "documents": [],
  "download_url": "/actions/core/serve-document/doc_7f0c2b9e4a1d",
  "filename": "report.md",
  "path": "report.md",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "size_bytes": 31,
  "text": "# Weekly report\n\nAll green.\n"
}

A link anyone can open to see an app or site running in a sandbox, such as a web server started with 'Run a command'. The sandbox must be running for the page to load.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.
PortportnumberRequired
The port the app listens on inside the sandbox.From 1 to 65535.
Link lasts (minutes)expires_in_minutesnumber
How long the link works, up to 1440 (a day). 60 if left blank.From 1 to 1440.

Outputs

expires_attext
portnumber
sandbox_idtext
urltext
Example output
{
  "expires_at": "2026-09-23T10:00:00Z",
  "port": 3000,
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "url": "https://3000-k2m9x7q4w8r1t5yb.proxy.daytona.works"
}

Get a sandbox

One sandbox: whether it is running, its resources, labels and when it stops or deletes itself.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

Outputs

auto_stop_minutesnumber
cpunumber
created_attext
delete_attext
delete_when_stoppedtrue/false
disk_gbnumber
error_reasontext
idtext
labelsobject
last_activity_attext
memory_gbnumber
nametext
regiontext
snapshottext
statetext
Example output
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}

List files

The files and folders in one folder of a sandbox, folders first.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
Folderfoldertext
The folder to list, such as data. Leave blank for the sandbox's working folder.

Outputs

countnumber
fileslist
foldertext
sandbox_idtext
Example output
{
  "count": 2,
  "files": [
    {
      "is_folder": true,
      "modified_at": "2026-09-23T09:01:00Z",
      "name": "data",
      "path": "/home/daytona/data",
      "size_bytes": 4096
    },
    {
      "is_folder": false,
      "modified_at": "2026-09-23T09:02:00Z",
      "name": "report.md",
      "path": "/home/daytona/report.md",
      "size_bytes": 31
    }
  ],
  "folder": "",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65"
}

List sandboxes

The sandboxes in your organization, newest first, optionally only those in some states, with some labels or whose name starts a certain way. Deleted sandboxes are not listed.

Inputs

Statestateslist
Only sandboxes in these states. Leave empty for all.One or more of: started (Running), stopped, paused, archived, error.
Labelslabelsobject
Only sandboxes that have all of these labels.
Name starts withnametext
Only sandboxes whose name starts with this text.
How manylimitnumber
At most this many, up to 200. 100 if left blank.From 1 to 200.
Next pagecursortext
To get the next page, use the 'next_cursor' an earlier 'List sandboxes' step returned.

Outputs

countnumber
next_cursortext
sandboxeslist
Example output
{
  "count": 1,
  "next_cursor": null,
  "sandboxes": [
    {
      "auto_stop_minutes": 15,
      "cpu": 1,
      "created_at": "2026-09-23T09:00:00.000Z",
      "delete_at": null,
      "delete_when_stopped": false,
      "disk_gb": 3,
      "error_reason": null,
      "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
      "labels": {
        "project": "reports"
      },
      "last_activity_at": "2026-09-23T09:00:04.000Z",
      "memory_gb": 1,
      "name": "report-builder",
      "region": "us",
      "snapshot": "daytona-small",
      "state": "started"
    }
  ]
}

Run a command

Run a shell command in a sandbox, such as installing a package or running tests, and get its output. A command that fails still returns its output, with 'succeeded' false.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
CommandcommandtextRequired
The command, as you would type it in a terminal. Chain several with &&.
Run in folderfoldertext
The folder to run it in, such as a cloned repository's. Leave blank for the sandbox's working folder.
Environment variablesenv_varsobject
Names and values it can read, such as an API key it needs. Names use letters, digits and underscores.
Time limit (seconds)timeout_secondsnumber
Stop it if it is still running after this long, up to 600 (10 minutes). 60 if left blank.From 1 to 600.

Outputs

exit_codenumber
outputtext
sandbox_idtext
succeededtrue/false
Example output
{
  "exit_code": 0,
  "output": "12 passed in 1.84s\n",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "succeeded": true
}

Run code

Run Python, JavaScript or TypeScript in a sandbox and get what it printed. Code that fails still returns its output, with 'succeeded' false, so a later step can act on it.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
Languagelanguagetext
The language the code is written in.One of: python, javascript, typescript. Default: python.
CodecodetextRequired
The code to run. Whatever it prints comes back as 'output'.
Environment variablesenv_varsobject
Names and values it can read, such as an API key it needs. Names use letters, digits and underscores.
Time limit (seconds)timeout_secondsnumber
Stop it if it is still running after this long, up to 600 (10 minutes). 60 if left blank.From 1 to 600.

Outputs

chartslist
exit_codenumber
outputtext
sandbox_idtext
succeededtrue/false
Example output
{
  "charts": [],
  "exit_code": 0,
  "output": "Total revenue: 48210\n",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "succeeded": true
}

Start a sandbox

Start a stopped or archived sandbox and wait until it is running. A running sandbox is left as it is.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

Outputs

auto_stop_minutesnumber
cpunumber
created_attext
delete_attext
delete_when_stoppedtrue/false
disk_gbnumber
error_reasontext
idtext
labelsobject
last_activity_attext
memory_gbnumber
nametext
regiontext
snapshottext
statetext
Example output
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}

Stop a sandbox

Stop a sandbox and wait until it has stopped. Its files are kept, unless it is set to delete when it stops. A stopped sandbox is left as it is.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

Outputs

auto_stop_minutesnumber
cpunumber
created_attext
delete_attext
delete_when_stoppedtrue/false
disk_gbnumber
error_reasontext
idtext
labelsobject
last_activity_attext
memory_gbnumber
nametext
regiontext
snapshottext
statetext
Example output
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "stopped"
}

Update a sandbox

Change when a sandbox stops or deletes itself, or its labels. Only the settings you fill in change.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.
Stop when idle for (minutes)auto_stop_minutesnumber
Stop the sandbox after this many minutes with nothing happening in it, so it stops using compute. Its files are kept. 0 keeps it running. Leave blank to keep as is.At least 0.
Delete when it stopsdelete_when_stoppedtext
Delete the sandbox, files and all, as soon as it stops. Good for one-off jobs. Leave blank to keep as is.One of: true (On), false (Off).
Delete after (minutes)delete_after_minutesnumber
Delete the sandbox this many minutes from now, whatever it is doing. 0 removes the limit. Leave blank to keep as is.At least 0.
Labelslabelsobject
New labels. They replace all of the sandbox's labels. Leave empty to keep them.

Outputs

auto_stop_minutesnumber
cpunumber
created_attext
delete_attext
delete_when_stoppedtrue/false
disk_gbnumber
error_reasontext
idtext
labelsobject
last_activity_attext
memory_gbnumber
nametext
regiontext
snapshottext
statetext
Example output
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}

Upload a file

Put a file in a sandbox: upload one, use a file from an earlier step, or type its text. Folders are created as needed and a file already there is replaced.

Inputs

SandboxsandboxtextRequired
Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
FilefiletextRequired
Upload a file, pick one from an earlier step, or type the text to save.
Save aspathtextRequired
Where to save it in the sandbox, such as data/sales.csv. A path that doesn't start with / is inside the sandbox's working folder.

Outputs

pathtext
sandbox_idtext
size_bytesnumber
Example output
{
  "path": "data/sales.csv",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "size_bytes": 2048
}

On this page