> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemoclaw/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemoclaw/_mcp/server.

# Run Sandboxes

> Run multiple sandboxes and stop or start containers, with dashboard and tunnel guidance where supported.

Use these workflows to keep existing sandboxes reachable and control the resources they consume.

## Manage Dashboard Ports

If a managed forward stopped or the URL does not load, restore its identity-bound lifecycle through NemoClaw.

```bash
nemoclaw my-gpt-claw recover
```

For lower-level diagnostics, list OpenShell's legacy and user-managed forwards separately. Receipt-owned ForwardTcp services are verified by `nemoclaw <name> status` and `recover`.

```bash
openshell forward list
```

## Run Multiple Sandboxes

Each sandbox needs its own dashboard port because `openshell forward` refuses to bind a port that another sandbox already uses.

When the default port is already held by another sandbox, `nemoclaw onboard` scans ports `18789` through `18799` and uses the next free port.

If you intentionally run separate OpenShell gateways on the same host, set a different `NEMOCLAW_GATEWAY_PORT` before each onboarding run.
NemoClaw isolates the gateway name and local state by port so one port-specific gateway does not replace another.
A non-default `NEMOCLAW_GATEWAY_PORT` also gets its own host state root at `~/.nemoclaw/gateways/<port>/`, with a separate sandbox registry, snapshots, and legacy credential-migration files, so gateway-scoped state stays segregated while shared host-level files remain under `~/.nemoclaw/`.
On first use after upgrading, NemoClaw moves legacy rows and related state only when their recorded gateway identity matches the selected port; ambiguous state is left untouched with remediation.
Provider credentials remain in the OpenShell gateway store.
The default port keeps the shared `~/.nemoclaw/` location.
When other ports remain, `nemoclaw uninstall` removes only the selected gateway and keeps the shared CLI, services, images, providers, configuration, models, and swap.

Gateway and dashboard cleanup is scoped by sandbox name and port.
A later onboarding run that uses a different `NEMOCLAW_GATEWAY_PORT` or `--control-ui-port` does not tear down the first sandbox's gateway or dashboard forward.

```bash
nemoclaw onboard                                      # first sandbox uses 18789
nemoclaw onboard                                      # second sandbox uses the next free port, such as 18790
```

To choose a specific port, pass `--control-ui-port`:

```bash
nemoclaw onboard --control-ui-port 19000
```

You can also set `CHAT_UI_URL` or `NEMOCLAW_DASHBOARD_PORT` before onboarding:

```bash
CHAT_UI_URL=http://127.0.0.1:19000 nemoclaw onboard
NEMOCLAW_DASHBOARD_PORT=19000 nemoclaw onboard
```

For port conflicts and overrides, refer to [Port already in use](../../reference/troubleshooting#port-already-in-use).

## Stop and Start a Sandbox

Stop a sandbox's container to free CPU, memory, and GPU resources without losing anything:

```bash
nemoclaw <sandbox-name> stop
```

Workspace files, credentials, network policies, and the registry entry are preserved.
The container stops running.
After the container stops, NemoClaw attempts to stop that sandbox's host dashboard forward.
The shared host gateway and tunnel services keep serving other sandboxes.

Start it again later:

```bash
nemoclaw <sandbox-name> start
```

After Docker reports the existing container as running, NemoClaw waits for OpenShell to report the sandbox in the `Ready` or `Running` state.
NemoClaw recovers missing agent processes and host forwards only after that phase, so a slow sandbox start does not need a separate `recover` command.
Refer to [`nemoclaw <name> stop`](../../reference/commands#nemoclaw-name-stop) and [`nemoclaw <name> start`](../../reference/commands#nemoclaw-name-start) for details.
Use [`nemoclaw <name> destroy`](../../reference/commands#nemoclaw-name-destroy) when you want to delete the sandbox instead.

## Manage the Cloudflare Tunnel

When the host has `cloudflared`, `nemoclaw tunnel start` starts a Cloudflare tunnel.
The tunnel can expose the dashboard with a public URL.
Set `CLOUDFLARE_TUNNEL_TOKEN` before running the command when you want to use a Cloudflare named tunnel instead of a generated quick-tunnel URL.

```bash
nemoclaw tunnel start
```

`nemoclaw tunnel stop` stops the tunnel and asks NemoClaw to stop the in-sandbox gateway for the selected or default sandbox.
The older `nemoclaw start` now prints migration guidance and exits successfully without starting
a sandbox or tunnel. Use `nemoclaw <name> start` or `nemoclaw tunnel start` explicitly.

## Related Topics

* [View Sandbox Status](view-sandbox-status) before changing a sandbox.
* [Recover and Rebuild Sandboxes](recover-and-rebuild-sandboxes) when start does not restore a healthy runtime.
* [Troubleshooting](../../reference/troubleshooting) for port, gateway, and dashboard failures.