Skip to main content

Installation

This guide covers installation for the OpenSandbox server and all available SDKs.

System Requirements

Server Requirements

  • Python: 3.10 or higher
  • Package Manager: uv (recommended) or pip
  • Runtime Backend:
    • Docker Engine 20.10+ (for Docker runtime)
    • Kubernetes 1.21+ (for Kubernetes runtime)
  • Operating System: Linux, macOS, or Windows with WSL2

SDK Requirements

SDK-specific requirements are listed in each section below.

OpenSandbox Server

The OpenSandbox server is a FastAPI-based service that manages the lifecycle of containerized sandboxes.

Installation

Configuration

The server uses a TOML configuration file to select and configure the underlying runtime.

Initialize Configuration

Generate a configuration file with example presets:
Use --force to overwrite an existing configuration file.

Configuration Examples

Docker Runtime with Host Networking
~/.sandbox.toml
Docker Runtime with Bridge Networking
~/.sandbox.toml
Kubernetes Runtime
~/.sandbox.toml
Security Hardening
~/.sandbox.toml
Network Policy with Egress Sidecar
~/.sandbox.toml

Starting the Server

Once configured, start the server:
Verify the server is running:
Expected response:

API Documentation

Once running, interactive API documentation is available at:

Python SDK

The Python SDK provides async and sync APIs for interacting with OpenSandbox.

Installation

Requirements

  • Python 3.10+
  • httpx (installed automatically)

Quick Verification

Java/Kotlin SDK

The Java/Kotlin SDK provides sandbox lifecycle management, command execution, and file operations.

Installation

Maven

pom.xml

Gradle (Kotlin DSL)

build.gradle.kts

Gradle (Groovy)

build.gradle

Requirements

  • Java 11+
  • Kotlin 1.8+ (for Kotlin projects)

Build from Source

JavaScript/TypeScript SDK

The JavaScript/TypeScript SDK provides full-featured sandbox interaction for Node.js and browser environments.

Installation

Requirements

  • Node.js 16+
  • TypeScript 4.5+ (for TypeScript projects)

Quick Verification

C#/.NET SDK

The C#/.NET SDK provides sandbox management for .NET applications.

Installation

Requirements

  • .NET 6.0+

Quick Verification

Code Interpreter SDKs

For advanced code execution capabilities, install the Code Interpreter SDKs:

Docker Images

OpenSandbox provides pre-built Docker images for common use cases:
  • opensandbox/execd:v1.0.6 - Execution daemon
  • opensandbox/code-interpreter:v1.0.1 - Code interpreter environment
  • opensandbox/egress:v1.0.1 - Egress control sidecar
Pull images before use:

Next Steps

Quickstart

Follow the quickstart guide to create your first sandbox

Configuration

Learn about advanced configuration options

Python SDK Guide

Explore Python SDK features in depth

Examples

Browse integration examples and use cases

Troubleshooting

  • Ensure you’re using Python 3.10+ or the appropriate runtime version
  • Try upgrading pip: pip install --upgrade pip
  • For uv issues, ensure it’s up to date: pip install --upgrade uv
  • Verify Docker is installed: docker --version
  • Ensure Docker daemon is running: docker ps
  • Check Docker socket permissions: ls -la /var/run/docker.sock
  • Verify kubeconfig path is correct in ~/.sandbox.toml
  • Test kubectl access: kubectl get nodes
  • Ensure the opensandbox namespace exists: kubectl get namespace opensandbox