---
title: "Sandboxes"
description: "Isolated machines started from a container image, for running commands and holding files, that suspend when idle and resume on the next call."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandboxes

A **sandbox** is its own virtual machine with its own kernel, started from a container image in
[Container Registry](/registry). It has a disk that lasts until you delete the sandbox. You run
commands in it, read and write its files, and suspend it when it has nothing to do: a suspended
sandbox keeps its memory and its files, and resumes where it stopped.

- [Quickstart](/sandboxes/quickstart) — Create a sandbox, run a command, copy a file, suspend and delete.
- [Images](/sandboxes/images) — Which images a sandbox starts from, and what it takes from them.
- [Lifecycle](/sandboxes/lifecycle) — Statuses, suspend and resume, idle suspend, stop and start.
- [Commands](/sandboxes/commands) — One-shot and interactive commands, timeouts and exit codes.
- [Files](/sandboxes/files) — Read and write files by path.
- [Networking](/sandboxes/networking) — Outbound connections and addresses.
- [Bots](/sandboxes/bots) — Give a sandbox a bot, so code in it calls EZGH with short-lived keys.
- [Limits](/sandboxes/limits) — Sizes, quotas and rates.

## What you can do

- **Run commands.** A [one-shot command](/sandboxes/commands#one-shot-commands) answers with its
  output and exit code. An [interactive command](/sandboxes/commands#interactive-commands) streams
  stdin and output, with a terminal if you ask for one.
- **Read and write files** by absolute path, up to 5 GiB each. See [Files](/sandboxes/files).
- **Suspend and resume.** A sandbox suspends by itself after its idle time, and the next command or
  file call resumes it. See [Lifecycle](/sandboxes/lifecycle).

## How you reach it

| With | Where |
| --- | --- |
| Console | **Sandboxes**: the list, a sandbox's page with a terminal, and create. |
| CLI | `ezgh sandboxes`. |
| API | `https://sandboxes.ezghcloud.com`. See [create a sandbox](/sandboxes-api/CreateSandbox/) and [run a command](/sandboxes-api/ExecCommand/). |

A sandbox belongs to a project. Its ID starts with `sbx_`.

## Permissions

| Policy | Allows |
| --- | --- |
| `SandboxesFullAccess` | Everything here. |
| `SandboxesReadOnlyAccess` | Listing and viewing sandboxes. `ReadOnlyAccess` includes the same. |

View access doesn't include files or commands: reading a file needs `sandboxes.sandboxes.readFile`,
which only `SandboxesFullAccess` has.

| Action | Allows |
| --- | --- |
| `sandboxes.sandboxes.list` | List sandboxes |
| `sandboxes.sandboxes.get` | View sandboxes |
| `sandboxes.sandboxes.create` | Create sandboxes |
| `sandboxes.sandboxes.suspend` | Suspend sandboxes |
| `sandboxes.sandboxes.resume` | Resume sandboxes |
| `sandboxes.sandboxes.stop` | Stop sandboxes |
| `sandboxes.sandboxes.start` | Start sandboxes |
| `sandboxes.sandboxes.delete` | Delete sandboxes |
| `sandboxes.sandboxes.exec` | Run commands in sandboxes |
| `sandboxes.sandboxes.readFile` | Read files in sandboxes |
| `sandboxes.sandboxes.writeFile` | Write files in sandboxes |

Creating a sandbox also needs permission to pull its [image](/sandboxes/images), and `bots.pass` on its [bot](/sandboxes/bots) when it has one.

## Audit

Trails records creating, suspending, resuming, stopping, starting and deleting a sandbox. Running a
command, reading a file and writing a file are recorded only when the call is refused. Command text,
command output, environment values and file contents are never recorded.

## What a sandbox doesn't have

- **Inbound connections.** A sandbox has no address of its own and nothing can connect to it. It
  makes [outbound connections](/sandboxes/networking) only.
- **Attached volumes.** Its disk is the only storage it has.
- **A private network.** It isn't in a VPC and can't reach private addresses in one.

Source: https://docs.ezghcloud.com/sandboxes/index.mdx
