Quickstart Guide
This guide will walk you through creating and running your first OpenSandbox instance. You’ll learn how to install the server, start it, and execute commands in a sandbox using the Python SDK.Prerequisites
Before you begin, ensure you have:- Docker (required for local execution)
- Python 3.10+ (recommended for examples and local runtime)
- uv or pip for package management
Initialize Configuration
Create a configuration file for Docker runtime:This creates a TOML configuration file with sensible defaults. For Kubernetes runtime, use
--example k8s instead.Start the Server
Launch the sandbox server:The server will start at Expected response:
http://0.0.0.0:8080 (or your configured host/port).To verify the server is running:What You Just Did
Congratulations! You’ve successfully:- Installed and configured the OpenSandbox server
- Created a sandbox with a code interpreter environment
- Executed shell commands in the sandbox
- Performed file operations (write and read)
- Executed Python code and retrieved results
- Cleaned up the sandbox resources
Next Steps
Installation Guide
Explore detailed installation options for server and all SDKs
Python SDK
Learn more about the Python SDK features and configuration
Examples
Explore integration examples for coding agents, browsers, and more
API Reference
Dive into the complete API documentation
Synchronous API Example
If you prefer synchronous code, OpenSandbox provides a sync API:Troubleshooting
Server won't start
Server won't start
- Ensure Docker is running:
docker ps - Check port 8080 is not in use:
lsof -i :8080 - Verify the config file exists:
cat ~/.sandbox.toml
Sandbox creation fails
Sandbox creation fails
- Verify the server is healthy:
curl http://localhost:8080/health - Check Docker can pull images:
docker pull ubuntu - Review server logs for detailed error messages
Connection timeout
Connection timeout
- Increase
request_timeoutin ConnectionConfig - Check network connectivity to the server
- Ensure firewall rules allow traffic on port 8080