Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/NVIDIA/OpenShell/llms.txt

Use this file to discover all available pages before exploring further.

This page covers creating sandboxes and managing them. For background on what sandboxes are and how isolation works, refer to Architecture.
Docker must be running before you create a gateway or sandbox. If it is not, the CLI returns a connection-refused error (os error 61). Start Docker and try again.

Create a sandbox

1

Run the create command

Create a sandbox with a single command. To create a sandbox with Claude:
openshell sandbox create -- claude
Every sandbox requires a gateway. If none exists, the CLI auto-bootstraps a local gateway.
2

Wait for provisioning

The sandbox moves through the Provisioning phase while the runtime sets up the environment, injects credentials, and applies your policy. When it reaches Ready, the agent process is active.

Choose your agent

Pass any supported agent as the trailing command:
openshell sandbox create -- claude
openshell sandbox create -- opencode
openshell sandbox create -- codex
openshell sandbox create -- copilot

Use the --from flag

Create a sandbox from a community package, a local directory, or a container image:
openshell sandbox create --from openclaw
openshell sandbox create --from ollama
The CLI resolves community names against the OpenShell Community catalog, pulls the bundled Dockerfile and policy, builds the image locally, and creates the sandbox. For the full catalog, refer to Community sandboxes.

Run on a remote gateway

If you plan to run sandboxes on a remote host or a cloud-hosted gateway, set up the gateway first, then create the sandbox as normal. Refer to Gateways for deployment options.

Request GPU resources

GPU passthrough is experimental. Expect rough edges and breaking changes.
Add --gpu to request GPU resources:
openshell sandbox create --gpu -- claude
NVIDIA drivers and the NVIDIA Container Toolkit must be installed on the host. The sandbox image must also include the appropriate GPU drivers and libraries.

Apply a policy at creation

Pass a policy YAML file with --policy:
openshell sandbox create --policy ./my-policy.yaml -- claude
To avoid passing --policy every time, set the OPENSHELL_SANDBOX_POLICY environment variable. Refer to Policies for the full policy workflow.

Forward a port at creation

openshell sandbox create --forward 8000 -- claude

Connect to a sandbox

Open an SSH session into a running sandbox:
openshell sandbox connect my-sandbox

Monitor and debug

List all sandboxes:
openshell sandbox list
Get detailed information about a specific sandbox:
openshell sandbox get my-sandbox
Stream sandbox logs to monitor agent activity and diagnose policy decisions:
openshell logs my-sandbox
FlagPurposeExample
--tailStream logs in real timeopenshell logs my-sandbox --tail
--sourceFilter by log source--source sandbox
--levelFilter by severity--level warn
--sinceShow logs from a time window--since 5m

Terminal UI

OpenShell Terminal combines sandbox status and live logs in a single real-time dashboard:
openshell term
Navigate with Tab to switch panels, j/k to move through lists, Enter to select, and : for command mode. Use it to spot blocked connections marked action=deny and inference-related proxy activity. If a connection is blocked unexpectedly, add the host to your network policy — refer to Policies.

Port forwarding

Forward a local port to a running sandbox to access services inside it, such as a web server or database:
openshell forward start 8000 my-sandbox
openshell forward start 8000 my-sandbox -d    # run in background
List and stop active forwards:
openshell forward list
openshell forward stop 8000 my-sandbox

Transfer files

Upload files from your host into the sandbox:
openshell sandbox upload my-sandbox ./src /sandbox/src
Download files from the sandbox to your host:
openshell sandbox download my-sandbox /sandbox/output ./local
You can also upload files at creation time with the --upload flag on openshell sandbox create.

Delete sandboxes

Deleting a sandbox stops all processes, releases resources, and purges injected credentials:
openshell sandbox delete my-sandbox

Next steps

Providers

Supply API keys and tokens to sandboxes.

Policies

Control what the agent can access on the network and filesystem.

Community sandboxes

Use a pre-built environment from the community catalog.

GitHub sandbox tutorial

End-to-end walkthrough with scoped GitHub repo access.

Build docs developers (and LLMs) love