# Create your first sandbox | Borealis Docs

> Create a Borealis sandbox, run a command, and clean up from the web app or CLI.

- Canonical URL: https://borealishq.io/docs/getting-started/
- Markdown mirror: https://borealishq.io/docs/getting-started/index.html.md

Start with a small Linux environment and confirm that it is running before you send it work.

## Before you begin

[Sign in to Borealis](https://app.borealishq.io/auth/login), select the organisation you want to work in, and check that you have sandbox creation permission and available capacity. New accounts can [register here](https://app.borealishq.io/auth/register).

## Choose the runtime workflow

For Runtime v2 machines, prepare or select a published image revision, check readiness for the chosen compute profile, and use the logical-machine lifecycle controls. Start with [Images and templates](/docs/images-and-templates), then [Sandbox lifecycle](/docs/sandboxes). New public MicroVMs default to ephemeral durability unless requested otherwise; check the machine's actual policy.

The container image and CLI example below applies to the legacy container creation workflow. It is not a Runtime v2 pause/resume example.

## Create a legacy container in the app

1. Open the sandboxes view and choose **Create**.
2. Enter a name, such as `my-first-sandbox`.
3. Choose `ubuntu:24.04` as the container image.
4. Set **Command** to `sleep` and **Args (JSON Array)** to `["infinity"]`. This keeps the example container running after startup.
5. Review **CPU Cores**, **Memory (GB)**, **Idle Timeout (minutes)**, and **Placement**. Use a pool available to your account.
6. Create the sandbox and wait until its status is running.

Image downloads and placement can take time. An accepted creation request is not a signal that commands can run yet.

## Create a legacy container with the CLI

With Node.js 22 or newer installed:

```sh
npm install --global @amaretto-software-labs/borealis-cli
borealis auth login
borealis context show --json
borealis sandbox create --body '{"name":"my-first-sandbox","image":"ubuntu:24.04","command":"sleep","args":["infinity"]}'
```

Keep the returned sandbox ID. Replace `SANDBOX_ID` in subsequent examples with that ID.

```sh
borealis sandbox get SANDBOX_ID --json
```

When it is running, execute a small command:

```sh
borealis sandbox exec SANDBOX_ID --body '{"command":"sh","args":["-lc","printf hello"]}'
```

The execution has its own ID and status. Use `borealis sandbox exec get SANDBOX_ID EXEC_ID --json` to inspect the result.

## Finish safely

Stop the sandbox when you no longer need its running compute:

```sh
borealis sandbox stop SANDBOX_ID
```

Stop ends running processes; it is not a memory snapshot. Before deleting an environment, preserve anything you need using [snapshots](/docs/snapshots) and [workspace exports](/docs/workspace-transfers). See the [lifecycle guide](/docs/sandboxes) for how these operations differ.
