> ## 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.

# DigitalOcean sandboxes

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

DigitalOcean MicroVMs (public preview) are lightweight VMs that run a container image in their own kernel and auto-pause when idle; Harness Runtime runs agent sessions in hardware-isolated microVM sandboxes with an exec API.

The following table shows what CostGraph runs on this provider.

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

## Connect

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

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

2. Enter these fields:

   * **Personal access token** (`DIGITALOCEAN_TOKEN`, required): A DigitalOcean personal access token from API > Tokens.
   * **Service** (`DIGITALOCEAN_SERVICE`, optional): The DigitalOcean product sandboxes run on: microvms (the default) or harness.
   * **Region** (`DIGITALOCEAN_REGION`, optional): The DigitalOcean 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 `digitalocean` 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).

To see what DigitalOcean costs, connect the [DigitalOcean integration](https://docs.costgraph.ai/costgraph/integrations/digitalocean.md).

## Key and permissions

`DIGITALOCEAN_TOKEN` is a DigitalOcean personal access token, created in the control panel under API > Tokens, optionally with custom scopes. `DIGITALOCEAN_SERVICE` picks the product sandboxes run on: `microvms` (the default) or `harness`.

For MicroVMs, a custom-scoped token needs `microvm:create`, `microvm:read`, `microvm:update` and `microvm:delete`. For Harness Runtime, use a full-access token.

Sources: [docs.digitalocean.com: networking access](https://docs.digitalocean.com/products/microvms/concepts/networking-access/index.html.md), [docs.digitalocean.com: limits](https://docs.digitalocean.com/products/microvms/details/limits/index.html.md), [docs.digitalocean.com: api](https://docs.digitalocean.com/products/microvms/reference/api/index.html.md), [docs.digitalocean.com: harness runtime](https://docs.digitalocean.com/reference/api/reference/harness-runtime/index.html.md), [docs.digitalocean.com: limits](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/limits/).

## Limits

* MicroVMs are public preview, MKC1 region only, linux/amd64 images only. ([source](https://docs.digitalocean.com/products/microvms/details/limits/index.html.md))
* MicroVM auto-pause cannot be disabled; max idle timeout 4 hours. Max 32 GiB memory and 400 GiB disk; sizes 1/2/8/16 vCPU. ([source](https://docs.digitalocean.com/products/microvms/reference/api/index.html.md))
* MicroVM exec: a command has 60 s to finish; 32 concurrent and 60 commands per minute per team; output capped at 4 MiB. ([source](https://docs.digitalocean.com/products/microvms/details/limits/index.html.md))
* Harness Runtime exec timeout\_seconds is clamped server-side to max 240 (default 60). ([source](https://docs.digitalocean.com/reference/api/reference/harness-runtime/index.html.md))
* Harness Runtime: idle suspend default 15 minutes; up to 100 concurrent sessions per team; monthly active compute cap 744 hours per session; sizes up to mars-16vcpu-32gb. ([source](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/limits/))

## 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.