# Regions

> Run sandboxes in US East (Virginia) or EU Central (Finland). New sandboxes go to the region nearest you unless you pick one.

Sandboxer runs in two regions:

| Region | Where |
| - | - |
| `us-east` | US East: Ashburn, Virginia |
| `eu-central` | EU Central: Helsinki, Finland |

## Choose a region

Pass `region` when you create a sandbox:

```bash title="CLI"
sbx new --region us-east
sbx regions            # lists regions and marks your nearest, where new sandboxes go by default
```

```bash title="curl"
curl -sS -X POST https://sandboxer.com/api/v1/sandboxes \
  -H "Authorization: Bearer $SANDBOXER_API_KEY" -H "Content-Type: application/json" \
  -d '{"region":"us-east"}'
```

```typescript title="TypeScript"
const sandbox = await sandboxer.create({ region: "us-east" });
```

```python title="Python"
sandbox = client.create(region="us-east")
```

The [MCP server](/docs/mcp)'s `create_sandbox` takes `region` too, and the [Daytona-compatible API](/docs/daytona) reads `target` (`us`, `eu`, or a region id).

An unknown region returns `400 invalid_region` with the list. A region with no machine free returns `503 region_unavailable`.

## Without a region

A new sandbox goes to the region nearest you, judged from the country of your IP address. The lookup runs on our servers against a local database; your address isn't sent anywhere else.

- Europe (including the UK), the Middle East, Africa, and South and Southeast Asia → `eu-central`.
- The Americas, East Asia and Oceania → `us-east`.
- Anything we can't place → `us-east`.

Every sandbox reports its `region` and `regionSource`: `requested` (you named it), `nearest` (picked from your location), `default`, or `source` (taken from what it was made from).

## Forks and snapshots stay in their region

- A fork runs in its source sandbox's region.
- A sandbox made from a named snapshot or a share code starts in that snapshot's region.
- A resume stays in the sandbox's region.

Naming a different region for any of these returns `400 region_mismatch`. Sandboxes created before regions arrived are in `eu-central`.

## List regions

`GET /api/v1/regions` needs no key:

```bash
curl -sS https://sandboxer.com/api/v1/regions
```

It returns `{ "regions": [{ "id", "name", "location", "available" }], "default", "nearest" }`, where `nearest` is the region new sandboxes would go to for you.

---

<small>IP geolocation by <a href="https://db-ip.com">DB-IP</a> (CC BY 4.0).</small>
