runtime/reference/cli/sandbox.md
The deno sandbox command allows you to spin up a secure Linux microVM,
designed for running untrusted code in a sandboxed environment. See the
Sandbox documentation for more detailed examples of usage.
In order to use the deno sandbox command, you need to have a Deno Deploy
account and a valid authentication token. Follow the instructions in the
Getting started with Deno Sandbox documentation.
-h, --help - Show this help.--token <token> - Auth token to use--config <config> - Path for the config file--org <name> - The name of the organizationCreates a new sandbox in an organization. Accepts the aliases create and
new.
deno sandbox create
Lists all sandboxes in an organization. Accepts the aliases list and ls.
deno sandbox list
Terminates a running sandbox immediately. Accepts the aliases kill, remove,
and rm.
deno sandbox kill <sandbox-id>
Copies files between your local machine and a running sandbox. Use copy or its
shorter alias cp.
deno sandbox copy <paths...>
Runs an arbitrary command inside an existing sandbox.
deno sandbox exec <sandbox-id> <command...>
Example:
deno sandbox exec sbx-1234 uptime
Extends how long a sandbox stays active before timing out.
deno sandbox extend <sandbox-id> <timeout>
Accepts time durations in the format of a number followed by a unit, where the
unit can be s for seconds, m for minutes, or h for hours.
Example:
deno sandbox extend <sandbox-id> 30m
Opens an interactive SSH session to the sandbox.
deno sandbox ssh <sandbox-id>
Turns the state of a running sandbox into a Deno Deploy application.
deno sandbox deploy <sandbox-id> <app>
Creates, lists, and attaches persistent block volumes.
deno sandbox volumes --help
Creates a new volume. Accepts the alias volumes create or volumes new.
deno sandbox volumes create <name>
Lists all volumes in an organization. Accepts the alias volumes list or
volumes ls.
deno sandbox volumes list
Deletes a volume. Accepts the alias volumes delete, volumes rm or
volumes remove.
deno sandbox volumes delete <volume-id-or-slug>
or
deno sandbox volumes delete <volume-slug>
Creates a snapshot of a volume. Accepts a volume ID or slug and a snapshot slug
deno sandbox volumes snapshot <volume-id-or-slug> <snapshot-slug>
or
deno sandbox volumes snapshot <volume-slug> <snapshot-slug>
Creates and restores filesystem snapshots for sandboxes.
deno sandbox snapshots --help
Creates a new snapshot of a sandbox. Accepts the alias snapshots create or
snapshots new. It requires a volume ID or volume slug and a snapshot slug.
deno sandbox snapshots create <volume-id-or-slug> <snapshot-slug>
Lists all snapshots in an organization. Accepts the alias snapshots list or
snapshots ls.
deno sandbox snapshots list
Deletes a snapshot. Accepts the alias snapshots delete, snapshots rm or
snapshots remove. It requires a snapshot ID or snapshot slug.
deno sandbox snapshots delete <id-or-slug>
Switches your current Deploy organization or application context, which the sandbox command uses for authentication.
deno sandbox switch