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
| Action | What it does |
|---|---|
| Archive a sandbox | Move a sandbox's files to cheaper storage, stopping it first if it is running. |
| 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. |
| Create a sandbox | Create a sandbox and wait until it is running, ready for code, commands and files. |
| Delete a sandbox | Delete a sandbox and everything in it. |
| 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. |
| Get a preview link | 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'. |
| Get a sandbox | One sandbox: whether it is running, its resources, labels and when it stops or deletes itself. |
| List files | The files and folders in one folder of a sandbox, folders first. |
| 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. |
| Run a command | Run a shell command in a sandbox, such as installing a package or running tests, and get its output. |
| Run code | Run Python, JavaScript or TypeScript in a sandbox and get what it printed. |
| Start a sandbox | Start a stopped or archived sandbox and wait until it is running. |
| Stop a sandbox | Stop a sandbox and wait until it has stopped. |
| Update a sandbox | Change when a sandbox stops or deletes itself, or its labels. |
| Upload a file | Put 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
- Sandbox
sandboxtextRequired - 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_minutesnumbercpunumbercreated_attextdelete_attextdelete_when_stoppedtrue/falsedisk_gbnumbererror_reasontextidtextlabelsobjectlast_activity_attextmemory_gbnumbernametextregiontextsnapshottextstatetext
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Repository URL
urltextRequired - The repository's https address.
- Clone into folder
foldertext - Where to put it in the sandbox. Leave blank to use the repository's name.
- Branch
branchtext - Leave blank for the repository's default branch.
- Access token
access_tokentext - Only for a private repository: a token that can read it, such as a GitHub personal access token.
- Username
usernametext - Only if your Git host needs one with the token, as Bitbucket does. GitHub and GitLab don't.
Outputs
branchtextfoldertextsandbox_idtexturltext
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
- Name
nametext - A name to find it by, unique in your organization. Leave blank and Daytona names it after its ID.
- Snapshot
snapshottext - 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 stops
delete_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 variables
env_varsobject - Names and values every program in the sandbox can read. Names use letters, digits and underscores.
- Labels
labelsobject - Tags to find the sandbox by later: 'List sandboxes' can filter by them.
Outputs
auto_stop_minutesnumbercpunumbercreated_attextdelete_attextdelete_when_stoppedtrue/falsedisk_gbnumbererror_reasontextidtextlabelsobjectlast_activity_attextmemory_gbnumbernametextregiontextsnapshottextstatetext
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.
Outputs
deletedtrue/falseidtextnametext
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- File path
pathtextRequired - 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_typetextdocument_reftextdocumentslistdownload_urltextfilenametextpathtextsandbox_idtextsize_bytesnumbertexttext
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"
}Get a preview link
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.
- Port
portnumberRequired - 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_attextportnumbersandbox_idtexturltext
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
- Sandbox
sandboxtextRequired - 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_minutesnumbercpunumbercreated_attextdelete_attextdelete_when_stoppedtrue/falsedisk_gbnumbererror_reasontextidtextlabelsobjectlast_activity_attextmemory_gbnumbernametextregiontextsnapshottextstatetext
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Folder
foldertext - The folder to list, such as data. Leave blank for the sandbox's working folder.
Outputs
countnumberfileslistfoldertextsandbox_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
- State
stateslist - Only sandboxes in these states. Leave empty for all.One or more of:
started(Running),stopped,paused,archived,error. - Labels
labelsobject - Only sandboxes that have all of these labels.
- Name starts with
nametext - Only sandboxes whose name starts with this text.
- How many
limitnumber - At most this many, up to 200. 100 if left blank.From 1 to 200.
- Next page
cursortext - To get the next page, use the 'next_cursor' an earlier 'List sandboxes' step returned.
Outputs
countnumbernext_cursortextsandboxeslist
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Command
commandtextRequired - The command, as you would type it in a terminal. Chain several with &&.
- Run in folder
foldertext - The folder to run it in, such as a cloned repository's. Leave blank for the sandbox's working folder.
- Environment variables
env_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_codenumberoutputtextsandbox_idtextsucceededtrue/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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Language
languagetext - The language the code is written in.One of:
python,javascript,typescript. Default:python. - Code
codetextRequired - The code to run. Whatever it prints comes back as 'output'.
- Environment variables
env_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
chartslistexit_codenumberoutputtextsandbox_idtextsucceededtrue/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
- Sandbox
sandboxtextRequired - 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_minutesnumbercpunumbercreated_attextdelete_attextdelete_when_stoppedtrue/falsedisk_gbnumbererror_reasontextidtextlabelsobjectlast_activity_attextmemory_gbnumbernametextregiontextsnapshottextstatetext
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
- Sandbox
sandboxtextRequired - 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_minutesnumbercpunumbercreated_attextdelete_attextdelete_when_stoppedtrue/falsedisk_gbnumbererror_reasontextidtextlabelsobjectlast_activity_attextmemory_gbnumbernametextregiontextsnapshottextstatetext
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
- Sandbox
sandboxtextRequired - 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 stops
delete_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.
- Labels
labelsobject - New labels. They replace all of the sandbox's labels. Leave empty to keep them.
Outputs
auto_stop_minutesnumbercpunumbercreated_attextdelete_attextdelete_when_stoppedtrue/falsedisk_gbnumbererror_reasontextidtextlabelsobjectlast_activity_attextmemory_gbnumbernametextregiontextsnapshottextstatetext
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
- Sandbox
sandboxtextRequired - Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- File
filetextRequired - Upload a file, pick one from an earlier step, or type the text to save.
- Save as
pathtextRequired - 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
pathtextsandbox_idtextsize_bytesnumber
Example output
{
"path": "data/sales.csv",
"sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
"size_bytes": 2048
}