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

# RemoteHost sandboxes

> Run CostGraph workflows and CI jobs in RemoteHost sandboxes: the key to create, its permissions, and its limits

RemoteHost runs agent sandboxes (qemu or firecracker VMs) in projects within an organization, created and operated through its REST API, SDK and CLI.

The following table shows what CostGraph runs on this provider.

| Workflows | CI runners | Connect with |
| - | - | - |
| Yes | Yes | Integrations or your own dispatcher |

## Connect

Connect RemoteHost on Integrations, and CostGraph starts sandboxes in your RemoteHost account. You don't run anything yourself.

1. In CostGraph, go to **Integrations > Sandbox > RemoteHost**.

2. Enter these fields:

   * **API key** (`REMOTEHOST_API_KEY`, required): A RemoteHost API key from API keys in the RemoteHost console.
   * **Organization ID** (`REMOTEHOST_ORG_ID`, required): The RemoteHost organization ID.
   * **Project ID** (`REMOTEHOST_PROJECT_ID`, required): The RemoteHost project sandboxes belong to.
   * **Region** (`REMOTEHOST_REGION`, optional): The RemoteHost region sandboxes run in, if not the default.

3. Click **Connect**.

### Your own dispatcher

To keep the key out of CostGraph or reach a private network, run your own dispatcher instead.
Set `provider` to `remotehost` and the preceding fields as environment variables, as described in [Run your own dispatcher](https://docs.costgraph.ai/costgraph/workflows/managed-sandboxes.md#run-your-own-dispatcher).

## Key and permissions

REMOTEHOST\_API\_KEY is a RemoteHost API key (rh\_sk\_...), created in the console under API keys or with "remote keys create "--name \<n>" "--template platform\`\` (default template ci; keys expire after 90 days by default). REMOTEHOST\_ORG\_ID is the organization id (GET /v1/me/orgs lists orgs the key can reach); REMOTEHOST\_PROJECT\_ID is the project the sandboxes belong to.

Keys are scoped by template or explicit `--scope`. The default 'ci' template lets a key `create, run in and clean up sandboxes`; 'platform' grants what a product backend needs. Named scopes include sandbox.read (list/retrieve), sandbox.create (create/update/attach/fork) and sandbox.stop; the scope names for exec and destroy are not documented on the endpoint pages. Keys are limited to one org and can be pinned to one workspace.

Sources: [docs.remotehost.ai: sdk](https://docs.remotehost.ai/docs/sdk), [docs.remotehost.ai: cli reference](https://docs.remotehost.ai/docs/cli-reference), [docs.remotehost.ai: platform](https://docs.remotehost.ai/docs/platform), [docs.remotehost.ai: concepts](https://docs.remotehost.ai/docs/concepts), [docs.remotehost.ai: exec sandbox command](https://docs.remotehost.ai/docs/api-reference/commands/exec-sandbox-command).

## Limits

* Exec timeoutSeconds 1-600 (default 120); stdout/stderr each capped at 64 KiB. ([source](https://docs.remotehost.ai/docs/api-reference/commands/exec-sandbox-command))
* Documented machine sizes: small 2 vCPU/4 GB, default 4 vCPU/8 GB, large 8 vCPU/16 GB (no xlarge listed). ([source](https://docs.remotehost.ai/docs/concepts))
* Plan required after a 7-day trial (402 plan\_required); plan limits return rate\_limited or limit\_reached; setup scripts max 30 minutes. Max lifetime, idle stop, regions and arch are not documented. ([source](https://docs.remotehost.ai/docs/sdk))

## Related

* [Supported sandbox providers](https://docs.costgraph.ai/costgraph/workflows/sandbox-providers.md)
* [Run workflows on a managed sandbox provider](https://docs.costgraph.ai/costgraph/workflows/managed-sandboxes.md)
* [Run CI jobs in sandboxes](https://docs.costgraph.ai/costgraph/autopilot/ci-sandboxes.md)


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