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
~/.sandbox.toml
~/.sandbox.toml
~/.sandbox.toml
~/.sandbox.toml
Starting the Server
Once configured, start the server:API Documentation
Once running, interactive API documentation is available at:- Swagger UI: http://localhost:8080/docs
- ReDoc: http://localhost:8080/redoc
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 daemonopensandbox/code-interpreter:v1.0.1- Code interpreter environmentopensandbox/egress:v1.0.1- Egress control sidecar
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
Package installation fails
Package installation fails
- 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
Docker runtime not found
Docker runtime not found
- Verify Docker is installed:
docker --version - Ensure Docker daemon is running:
docker ps - Check Docker socket permissions:
ls -la /var/run/docker.sock
Kubernetes connection fails
Kubernetes connection fails
- Verify kubeconfig path is correct in ~/.sandbox.toml
- Test kubectl access:
kubectl get nodes - Ensure the opensandbox namespace exists:
kubectl get namespace opensandbox