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

# Manage sandboxes

> See every sandbox, stop or delete it, keep it warm or pinned, and set lifetimes, limits and snapshots.

Admins with **Manage Sandboxes** see and control every sandbox under **Settings → Sandbox → Sandboxes**, and set the rules for all of them under **Settings → Sandbox → Settings**.

## The list of sandboxes

![The Sandboxes tab with each sandbox's report, environment, state and usage](https://mintcdn.com/bagofwords/jdi37jk3RbRDCvpb/images/sandboxes/sandboxes-tab.png?fit=max\&auto=format\&n=jdi37jk3RbRDCvpb\&q=85\&s=86558cfcca88b2ffe5ad66f21a6ca3c2)

Each row is one sandbox: its report and the person it belongs to, its environment, the compute it runs on, its state, when it was last used, and its live CPU, memory and disk use.

| State | Meaning |
| - | - |
| **Starting** | Being created |
| **Ready** | Running and waiting for the next run |
| **Running** | A run is in progress |
| **Idle** | Not used for a while. On a compute that supports it, its programs are frozen in memory, so it uses no CPU and the next run continues at once |
| **Stopped** | Its container is stopped. Its files are kept, and it starts again on the next run |
| **Failed** | It could not be started, or it is gone from its compute. The next run in its report creates a new one |

A row also says when the sandbox **Will be deleted** and why, and shows **Pinned**, **Kept warm** or **Old setup** when those apply.

### Actions

![The actions menu of a sandbox](https://mintcdn.com/bagofwords/jdi37jk3RbRDCvpb/images/sandboxes/sandboxes-actions.png?fit=max\&auto=format\&n=jdi37jk3RbRDCvpb\&q=85\&s=e10db53b97a22dafe042bedd75adfbbe)

| Action | What it does |
| - | - |
| **Stop run** | Stops the run in progress. The sandbox stays |
| **Stop** | Stops the sandbox and keeps its files. It starts again on the next run |
| **Start** | Starts a stopped sandbox now, so the next run does not wait for it |
| **Keep warm…** | For the hours you choose, the sandbox is not paused or stopped for being idle. It keeps holding its CPU and memory meanwhile |
| **Pin** | The sandbox is not deleted for being stopped too long or for its age. It is still deleted with its report |
| **Extend…** | Pushes its deletion later by the days you choose |
| **Snapshot now** | Copies its workspace into BOW's file store. See [Snapshots](#snapshots) |
| **Details** | Opens everything known about the sandbox |
| **Delete** | Removes the sandbox, its files and its installed packages. Files already saved to the report are kept. A run in progress is stopped first |

### Details

![The details of a sandbox: its facts, usage and recent runs](https://mintcdn.com/bagofwords/jdi37jk3RbRDCvpb/images/sandboxes/sandbox-detail.png?fit=max\&auto=format\&n=jdi37jk3RbRDCvpb\&q=85\&s=f0d2a2a5cbd15488ac9c254cb486e260)

The details show:

* **Facts**: report, person, environment, network, compute, limits, image, when it was created and last used, and when it will be deleted.
* **Recent runs**: the last 20, with their code, output, exit code and the files saved. Code and output are hidden from admins without **View generated code**.
* **Domain log**: the domains the sandbox reached or was refused, refused ones first, with how many times and when. It is collected every couple of minutes and once more when the sandbox stops.
* **Timeline**: what happened to the sandbox: created, runs, script output, idle, stopped, snapshots, a deletion announced, and who did what.
* **Volumes** mounted in it, and programs a run left running.

## Settings

![The Sandbox settings tab](https://mintcdn.com/bagofwords/jdi37jk3RbRDCvpb/images/sandboxes/settings-tab.png?fit=max\&auto=format\&n=jdi37jk3RbRDCvpb\&q=85\&s=77f2364bf1d07b108f8e742df0bc14b3)

### Sandboxes

**Enable agent sandboxes** is the organization's switch. While it is off, agents are not offered sandboxes and no sandbox can be created or run. You can still add computes and environments, so you can prepare everything first and switch it on last.

Turning it off later does not remove existing sandboxes. They accept no new runs, and they are stopped and deleted by the lifetime rules below.

### Defaults and limits

| Setting | Default | Meaning |
| - | - | - |
| **Default environment** | None | The environment used when a report has not chosen one |
| **Running sandboxes per person** | 3 | How many sandboxes one person can have running at the same time |

### Lifetime

| Setting | Default | Meaning |
| - | - | - |
| **Idle timeout** | 30 minutes | A sandbox with no runs for this long is stopped |
| **Keep stopped sandboxes** | 7 days | A stopped sandbox is deleted after this long |
| **Maximum lifetime** | 30 days | Any sandbox is deleted this long after it was created, unless it is pinned. Choose **No maximum** to stop deleting sandboxes for their age |
| **Announce a deletion** | 24 hours | How long before a sandbox is deleted on its own this is announced: in its timeline, in the audit log, and to the agent on the next run. 0: no announcement |

A sandbox is also deleted when its report is deleted.

### Allowed outbound connections

The domains a sandbox on the **Allowed domains only** network policy can reach, one per line, without a protocol, port or path. The defaults are the pip, npm and Go package registries:

```
pypi.org
files.pythonhosted.org
registry.npmjs.org
proxy.golang.org
sum.golang.org
```

A domain added here is open to all traffic to that domain, not only package downloads.

### Snapshots

A snapshot is a copy of everything in a sandbox's workspace: its files and the packages installed there. It is kept in BOW's own file store, not on the compute.

A snapshot is what lets a sandbox survive the loss of its compute, or be moved off it: the sandbox is recreated elsewhere from its last snapshot. Without one, only the files saved to the report come back.

| Setting | Default | Meaning |
| - | - | - |
| **Snapshot when a sandbox stops** | Off | Takes a snapshot each time a sandbox is stopped. It costs time and space in proportion to what the workspace holds |
| **Maximum snapshot size** | 2048 MB | A workspace whose snapshot would be larger is not snapshotted |

Good to know:

* One snapshot is kept per report. A new one replaces the old.
* A snapshot is restored only into a sandbox of the same environment.
* Deleting a sandbox on purpose deletes its snapshot too.
* [Evacuating a compute](https://docs.bow.ai/sandboxes/compute.md#maintenance) takes a snapshot of each sandbox whatever this setting says.

## When something is wrong

| What you see | What it means | What to do |
| - | - | - |
| A run says the sandbox **could not be reached** | The sandbox is running but its compute's router or network did not answer. Nothing in the sandbox was changed | Try again. If it keeps happening, run **Test** on the compute. If only one sandbox is affected, **Stop** it and **Start** it |
| A run shows **Fresh filesystem** | The sandbox was gone from its compute and was recreated | Files saved to the report were put back. Turn on snapshots to keep the rest next time |
| An environment's row says new sandboxes are refused | Its setup or start script failed three times in a row | Fix the script or the image and save |
| A run is refused because no compute has room | Every enabled compute is full or does not match the environment's labels, volumes or isolation | Stop or delete sandboxes, raise the compute's capacity rules, or add a compute |
| A person reached their limit of running sandboxes | **Running sandboxes per person** | Stop one of their sandboxes, or raise the limit |

## Audit

Sandbox activity is written to the [audit log](https://docs.bow.ai/observe-and-govern/audit-logs.md): sandboxes created, resumed, stopped and deleted, every run, runs that were declined, files passed into a sandbox, sandboxes pinned, extended and kept warm, and every change to computes, environments, access and settings.

## Related

* [Compute](https://docs.bow.ai/sandboxes/compute.md)
* [Environments](https://docs.bow.ai/sandboxes/environments.md)
* [Audit logs](https://docs.bow.ai/observe-and-govern/audit-logs.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.