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

# Docker Sandbox

> The recommended sandbox provider for running OpenHands locally.

The **Docker sandbox** runs the agent server inside a Docker container. This is
the default and recommended option for most users.

<Note>
  In some self-hosted deployments, the sandbox provider is controlled via the
  legacy <code>RUNTIME</code> environment variable. Docker is the default.
</Note>

## Why Docker?

* Isolation: reduces risk when the agent runs commands.
* Reproducibility: consistent environment across machines.

## Mounting your code into the sandbox

If you want OpenHands to work directly on a local repository, mount it into the
sandbox.

### Recommended: CLI launcher

If you start OpenHands via:

```bash theme={null}
openhands serve --mount-cwd
```

your current directory will be mounted into the sandbox workspace.

### Using SANDBOX\_VOLUMES

You can also configure mounts via the <code>SANDBOX\_VOLUMES</code> environment
variable (format: <code>host\_path:container\_path\[:mode]</code>):

```bash theme={null}
export SANDBOX_VOLUMES=$PWD:/workspace:rw
```

<Note>
  Anything mounted read-write into <code>/workspace</code> can be modified by the
  agent.
</Note>

## Custom sandbox images

To customize the container image (extra tools, system deps, etc.), see
[Custom Sandbox Guide](/openhands/usage/advanced/custom-sandbox-guide).
