---
title: "Quickstart"
description: "Create a sandbox from an image, run a command, copy a file, suspend it and delete it."
---

> 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.

# Quickstart

You need an image in [Container Registry](/registry) that you can pull, and
`SandboxesFullAccess` in the project.

## With the CLI

1. **Step 1**

   [Push an image](/registry) to Container Registry, or pick one you already have.

   ```sh
   IMAGE=<id>.registry.ezghcloud.com/team-a/runner:v3
   ```
2. **Step 2**

   Create a sandbox and wait until it's running.

   ```sh
   ezgh sandboxes create "$IMAGE" --name scratch --wait
   ```
3. **Step 3**

   Run a command. Its output is printed as it arrives, and `ezgh` exits with the command's exit code.

   ```sh
   ezgh sandboxes exec scratch -- uname -a
   ```

   For a shell, add `-t`:

   ```sh
   ezgh sandboxes exec -t scratch -- sh
   ```
4. **Step 4**

   Copy a file in, and a result out.

   ```sh
   ezgh sandboxes cp ./job.sh scratch:/work/job.sh
   ezgh sandboxes exec scratch -- sh /work/job.sh
   ezgh sandboxes cp scratch:/work/result.json ./result.json
   ```
5. **Step 5**

   Suspend it. Its memory and files are saved, and the next command or file call resumes it.

   ```sh
   ezgh sandboxes suspend scratch --wait
   ```
6. **Step 6**

   Delete it when you're done. Its files are removed.

   ```sh
   ezgh sandboxes delete scratch --yes
   ```

## In the console

1. **Step 1**

   Open **Sandboxes** and choose **Create sandbox**.
2. **Step 2**

   Enter the image as `<registry host>/<repository>:<tag>`, choose a size, and create it.
3. **Step 3**

   Open the sandbox, then its **Terminal** tab, and choose **Connect** for a shell.
4. **Step 4**

   Suspend, resume, stop, start or delete it from the sandbox's page.

## Next

- [Images](/sandboxes/images): what a sandbox takes from its image.
- [Lifecycle](/sandboxes/lifecycle): statuses and idle suspend.
- [Commands](/sandboxes/commands) and [Files](/sandboxes/files).

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