Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions apps/web/src/app/(docs)/mintlify-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Mintlify Starter Kit

Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including

- Guide pages
- Navigation
- Customizations
- API Reference pages
- Use of popular components

### Development

Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command

```
npm i -g mintlify
```

Run the following command at the root of your documentation (where mint.json is)

```
mintlify dev
```

### Publishing Changes

Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.

#### Troubleshooting

- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
- Page loads as a 404 - Make sure you are running in a folder with `mint.json`
41 changes: 41 additions & 0 deletions apps/web/src/app/(docs)/mintlify-docs/api-key/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "API Key"
icon: "key"
---

To use the API key, you can either:

- **Set the API key as the `E2B_API_KEY` environment variable** to avoid passing it each time you create a sandbox.
- Or pass it directly to the `Sandbox` constructor as shown below:

<CodeGroup>
```js JavaScript & TypeScript
import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })
```
```python Python
from e2b_code_interpreter import Sandbox

sbx = Sandbox.create(api_key="YOUR_API_KEY")
```
</CodeGroup>

## Where to find API key

You can get your API key at [dashboard](https://e2b.dev/dashboard?tab=keys).

<br/>

# Access Token

The access token is used only in the CLI and is **not needed in the SDK**. There's no need to set it when logging into the CLI using `e2b auth login`.

<Note>
To authenticate without the browser, you can set `E2B_ACCESS_TOKEN` as an environment variable. This is useful for CI/CD pipelines.
</Note>

## Where to find Access token

You can get your **Access token key** at the [dashboard](https://e2b.dev/dashboard/account).

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sandbox/metadata/index.mdx = https://e2b.dev/docs/sandbox/metadata
 ⎿ the following page linked doesn't exist: [beta version of the SDK](/sandbox/installing-beta-sdks) = https://e2b.dev/docs/sandbox/installing-beta-sdks
70 changes: 70 additions & 0 deletions apps/web/src/app/(docs)/mintlify-docs/byoc/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: "BYOC (Bring Your Own Cloud)"
sidebarTitle: Bring Your Own Cloud
---

BYOC (Bring Your Own Cloud) allows you to deploy E2B sandboxes to your own cloud infrastructure within your VPC.

BYOC is currently only available for AWS. We are working on adding support for Google Cloud and Azure.

<Note>
BYOC is offered to enterprise customers only.
If you’re interested in BYOC offering, please book a call with our team [here](https://e2b.dev/contact) or contact us at [[email protected]](mailto:[email protected]).
</Note>

## Architecture

Sandbox templates, snapshots, and runtime logs are stored within the customer's BYOC VPC.
Anonymized system metrics such as cluster memory and cpu are sent to the E2B Cloud for observability and cluster management purposes.

All potentially sensitive traffic, such as sandbox template build source files,
sandbox traffic, and logs, is transmitted directly from the client to the customer's BYOC VPC without ever touching the E2B Cloud infrastructure.

### Glossary
- **BYOC VPC**: The customer's Virtual Private Network where the E2B sandboxes are deployed. For example your AWS account.
- **E2B Cloud**: The managed service that provides the E2B platform, observability and cluster management.
- **OAuth Provider**: Customer-managed service that provides user and E2B Cloud with access to the cluster.

<Frame>
<img src="/images/byoc-architecture-diagram.png" />
</Frame>

### BYOC Cluster Components
- **Orchestrator**: Represents a node that is responsible for managing sandboxes and their lifecycle. Optionally, it can also run the template builder component.
- **Edge Controller**: Routes traffic to sandboxes, exposes API for cluster management, and gRPC proxy used by E2B control plane to communicate with orchestrators.
- **Monitoring**: Collector that receives sandbox and build logs and system metrics from orchestrators and edge controllers. Only anonymized metrics are sent to the E2B Cloud for observability purposes.
- **Storage**: Persistent storage for sandbox templates, snapshots, and runtime logs. Image container repository for template images.

## Onboarding

Customers can initiate the onboarding process by reaching out to us.
Customers need to have a dedicated AWS account and know the region they will use.
After that, we will receive the IAM role needed for managing account resources.
For AWS account quota limits may need to be increased.

Terraform configuration and machine images will be used for provisioning BYOC cluster.
When provisioning is done and running, we will create a new team under your E2B account that can be used by SDK/CLI the same way as it is hosted on E2B Cloud.

## FAQ

<AccordionGroup>
<Accordion title="How Is Cluster Monitored?">
Cluster is forwarding anonymized metrics such as machine cpu/memory usage to E2B Control plane for advanced observability and alerting.
The whole observability stack is anonymized and does not contain any sensitive information.
</Accordion>
<Accordion title="Can cluster automatically scale?">
A cluster can be scaled horizontally by adding more orchestrators and edge controllers.
The autoscaler is currently in V1 not capable of automatically scale orchestrator nodes that are needed for sandbox spawning.
This feature is coming in the next versions.
</Accordion>
<Accordion title="Are sandboxes accessible only from a customer’s private network?">
Yes. Load balancer that is handling all requests coming to sandbox can be configured as internal and VPC peering
with additional customer’s VPC can be configured so sandbox traffic can stay in the private network.
</Accordion>
<Accordion title="How control plane secure communication is ensured?">
Data sent between the E2B Cloud and your BYOC VPC is encrypted using TLS.

VPC peering can be established to allow direct communication between the E2B Cloud and your BYOC VPC.
When using VPC peering, the load balancer can be configured as private without a public IP address.
</Accordion>
</AccordionGroup>
12 changes: 12 additions & 0 deletions apps/web/src/app/(docs)/mintlify-docs/cli/auth/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Authentication in CLI"
sidebarTitle: Authentication
---

You must authenticate with E2B CLI before using it. Run the following command to sign in into your E2B account:

<CodeGroup>
```bash Terminal
e2b auth login
```
</CodeGroup>
36 changes: 36 additions & 0 deletions apps/web/src/app/(docs)/mintlify-docs/cli/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "E2B CLI"
sidebarTitle: Installation
---

E2B CLI is a command line tool that allows you to list, kill running sandboxes, and manage [sandbox templates](/sandbox-template).

## Installation

**Using Homebrew (on macOS)**

<CodeGroup>
```bash Terminal
brew install e2b
```
</CodeGroup>

**Using NPM**

You can install E2B CLI using the following command:

<CodeGroup>
```bash Terminal
npm i -g @e2b/cli
```
</CodeGroup>

### Beta CLI

The latest beta version of the CLI can be installed from NPM using the following command:

<CodeGroup>
```bash Terminal
npm i -g @e2b/cli@beta
```
</CodeGroup>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: "List sandboxes"
---

You can list all sandboxes using the following command:

<CodeGroup>
```bash Terminal
e2b sandbox list
```
</CodeGroup>

This will return running sandboxes, you can specify `--state` to get paused or both.

### Filter by state

To filter the sandboxes by their state you can specify the `--state` flag, which can either be "**running**", "**paused**" or both.

```bash
e2b sandbox list --state running,paused
```

### Filter by metadata

To filter the sandboxes by their metadata, use the `--metadata` flag.

```bash
e2b sandbox list --metadata key1=value1,key2=value2
```

### List limit

To limit the amount of sandboxes returned by the command, use the `--limit` flag.

```bash
e2b sandbox list --limit 10
```

By default, the command will return all sandboxes.

### Output format

To output the sandboxes in JSON format, use the `--format` flag.

**Pretty print (default)**

```bash
e2b sandbox list --format pretty
```

**JSON**

```bash
e2b sandbox list --format json
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "Shutdown running sandboxes"
---

You can shutdown single or all running sandboxes with the E2B CLI.

## Shutdown single or multiple sandboxes

To shutdown a single or multiple sandboxes, run the following command:

<CodeGroup>
```bash Terminal
e2b sandbox kill <sandbox-id1> <sandbox-id2> <sandbox-id3>
```
</CodeGroup>

## Shutdown all sandboxes

To shutdown all running sandboxes, run the following command:

<CodeGroup>
```bash Terminal
e2b sandbox kill --all
```
</CodeGroup>

Further, you can filter the sandboxes to be shutdown by state, metadata or both.

<CodeGroup>
```bash Terminal
e2b sandbox kill --all --state=running,paused
```
</CodeGroup>

<CodeGroup>
```bash Terminal
e2b sandbox kill --all --metadata=key=value
```
</CodeGroup>

<CodeGroup>
```bash Terminal
e2b sandbox kill --all --state=running,paused --metadata=key=value
```
</CodeGroup>
Loading