mrkeyoor.com_
Tue 01 Sept 17:42 UTC
Self-Hostedevaluationupdated 26 Aug 2026

CubeSandbox review

CubeSandbox is a self-hosted service for running AI-generated code inside short-lived micro virtual machines. It provides an E2B-compatible API, dedicated guest kernels, snapshots, network controls, and a path from one Linux host to a cluster for teams that need stronger isolation than ordinary containers.

+202stars / 7d
Verdict

Our CubeAPI run built in 108 seconds and passed all 120 Rust tests, the cleanest measured result in this batch. CubeSandbox deserves a serious trial when untrusted agent code needs microVM isolation and your team can own KVM, networking, templates, and storage. Keep credential injection off plaintext paths, test SDK timeout semantics, and treat the Kubernetes deployment as preview until those constraints fit your threat model.

We ran it

Lab card: what happened when we ran CubeSandboxScreenshot of CubeSandbox (cubesandbox.com)
Install✓ · 41s302 packages
Build✓ · 108s
Tests✓ · 43s120 passed · 0 failed of 120 (cargo test)
Repo3256 files~614,804 lines of source · 55.7 MB · 26 CI workflows · Dockerfile · tests dir

Answers from our run

Does CubeSandbox build from source?

Dependencies installed in 41 seconds (302 packages), and the build succeeded in 108 seconds. We cloned commit 624e187 into a clean Debian container with 3 CPUs and no project-specific setup.

Do CubeSandbox's tests pass?

Yes: 120 of 120 passed when we ran the project's own test command (cargo test). Some failures need services or credentials a bare container does not have.

Who should not use CubeSandbox?

Developers limited to macOS, Windows, or Linux without KVM: the quick start requires x86_64 Linux with KVM and labels the development VM path as poor-performing.

What are the alternatives to CubeSandbox?

E2B, Daytona, gVisor. Our CubeAPI run built in 108 seconds and passed all 120 Rust tests, the cleanest measured result in this batch.

Setup2/5Clean CubeAPI checks; a live cluster still needs KVM and many services
Docs5/5Bilingual architecture, deployment, security, and operations guides
Community5/511,352 stars with same-day fixes, reports, and pull requests
Maturity3/5120 tests passed, while K8s and several lifecycle paths remain young

Discussed on

  1. hnShow HN: We built a <60ms, open-source alternative to E2B using RustVMM and KVM7 points
  2. hnCubeSandbox: Instant, Concurrent, Secure and Lightweight Sandbox for AI Agents5 points
  3. hnSecure, Fast, and Extensible Sandbox Runtime for AI Agents4 points
  4. hnCubeSandbox by Tencent3 points

Who it’s for

Platform teams that let agents execute untrusted code and want a dedicated kernel around each workload.
Organizations replacing E2B Cloud with infrastructure they operate while keeping much of the E2B client interface.
Agent or reinforcement-learning systems that need templates, cloning, pause, resume, rollback, and multi-node scheduling.
Infrastructure engineers comfortable with KVM, eBPF networking, storage plugins, databases, and several control-plane services.

Who it’s NOT for

Developers limited to macOS, Windows, or Linux without KVM: the quick start requires x86_64 Linux with KVM and labels the development VM path as poor-performing.
Small teams expecting a Docker-style local utility: installation provisions a host, several services, node capacity, and sandbox templates.
Operators needing complete E2B behavior today: closing remaining compatibility gaps is still a roadmap item, and issue 1484 reports the E2B 0 timeout convention hanging commands in Node and Python clients.
Security-sensitive deployments that cannot disable plaintext credential injection: issue 1410 shows injected secrets can be sent to an attacker-controlled IP on the HTTP path.
Teams requiring settled Kubernetes operations: v0.6.0 labels that deployment path preview and says advanced upgrade work is still in development.

Setup reality

Our sandbox installed 302 Rust packages in 41 seconds for the project under CubeAPI/. The build succeeded in 108 seconds, and all 120 cargo tests passed in 43 seconds. The repository had 26 CI workflow files, a Dockerfile, and a tests directory.

A live system needs x86_64 Linux with KVM, prepared sandbox templates, a database, containerd-facing runtime components, networking, and enough host capacity. Kubernetes, S3-compatible volumes, credential injection, and SDK access add cluster settings or secrets.

The Rust API is only one part of a 3,256-file repository. CubeMaster, Cubelet, CubeProxy, CubeVS, CubeEgress, the hypervisor, storage, and host kernel settings still need deployment and failure testing.

Each sandbox gets a dedicated guest kernel

CubeSandbox runs agent workloads in micro virtual machines built around KVM rather than in ordinary containers that share the host kernel. The external API creates sandboxes, runs commands, moves files, exposes services, and destroys the environment. Templates, cloning, pause and resume, snapshots, and rollback cover the lifecycle expected by coding agents and reinforcement-learning systems that execute many short-lived jobs. The E2B-compatible interface gives existing clients a possible migration path to self-hosted infrastructure.

The architecture is a platform, not one daemon. CubeAPI handles the external REST surface, CubeMaster schedules work, Cubelet manages each compute node, and CubeProxy routes inbound connections. CubeVS applies eBPF network isolation. CubeEgress enforces outbound rules and can inject credentials without placing them in the guest. CubeHypervisor and CubeShim manage microVMs through the container runtime. Each layer narrows a real problem, while every additional state transition creates another failure mode to test.

The first host must provide x86_64 Linux and KVM

The quick start requires an x86_64 Linux environment with KVM support. Documented routes cover a compatible cloud VM, bare metal, and a QEMU development environment that the project labels poor-performing. Installation then checks the web console on port 12088, confirms nodes are ready, obtains or builds a template, and creates the first sandbox. That is guided infrastructure setup, not a local package that works on any developer laptop.

Version 0.6.0 added Kubernetes deployment, an E2B-style volume framework, template aliases, node isolation, and a separate CubeOps service. Kubernetes support is explicitly preview. Alias creation also had SDK limits in that release, and the roadmap still lists remaining E2B compatibility, cross-node pause and resume, cross-node snapshot launch, fault recovery, and richer scheduling. Those are aspirations or active work, not current guarantees.

What happened when we ran it

Our sandbox installed 302 Rust packages in 41 seconds for the project under CubeAPI/. The build completed successfully in 108 seconds. Cargo test then passed all 120 tests in 43 seconds with 0 failures. The run used an unprivileged Debian container with 3 CPUs and 12 GB of RAM, without secrets. It verifies that the measured API component compiled and passed its available unit-level command in that environment.

The full checkout at commit 624e187 contained 3,256 files, roughly 614,804 lines of source, and 55.7 MB before packages. Our scan found 26 CI workflow files, a Dockerfile, and a tests directory. We did not boot KVM guests, create templates, attach volumes, exercise eBPF rules, or run a multi-node control plane. The clean 120-of-120 result should raise confidence in CubeAPI, not be stretched into a claim about a deployed sandbox cluster.

Plaintext credential injection has a concrete exfiltration report

CubeEgress can hold a secret outside the sandbox and add it only to matching outbound requests. That design protects against agent code simply reading an environment variable. Open issue 1410 identifies a dangerous exception: on the plaintext HTTP path, a sandbox can choose an attacker-controlled destination IP and spoof the expected Host header, causing the proxy to inject the operator credential toward that destination. The HTTPS path has certificate checks that change this result.

The report describes the default internet-access posture and traces the relevant proxy decisions. Until a released fix is verified, security-sensitive operators should prevent injected credentials from using plaintext HTTP, restrict destinations independently, and test the exact policy with an attacker-controlled endpoint. Hardware isolation does not help once an authorized proxy sends a secret out of the host. The credential system and microVM boundary solve different parts of the threat model.

E2B compatibility still has SDK edge cases

Issue 1484 reports that commands.run in the Node and Python SDKs forwards non-positive timeout values to the sandbox service. Both 0, which E2B uses for no deadline, and the exported NEVER_TIMEOUT value of -1 can lead to a generic transport timeout. The Go SDK handles those values differently. A team porting E2B code should test command deadlines, long-running jobs, cancellation, PTY sessions, file transfer, and reconnection across every chosen SDK.

A related lifecycle report, issue 1400, says setting a sandbox timeout to -1 calculates an end time in the past instead of representing no expiration. Issue 1521 describes an intermittent paused sandbox that could neither resume nor terminate on v0.6.0. These reports are not evidence that every pause or timeout fails. They identify exactly the operations that need soak tests and administrative recovery procedures before tenants depend on them.

Active maintenance accompanies a young operations surface

GitHub recorded 11,352 stars, 176 combined open issues and pull requests, and a last push on August 26, 2026. Version 0.6.0 shipped on July 24, and recent activity includes storage, networking, API, documentation, and security fixes. The project has moved quickly since its initial public release. That pace is encouraging, while long-term upgrade and recovery evidence is necessarily limited for a young control plane.

CubeSandbox belongs on the shortlist for a team that truly needs to run hostile or unpredictable agent code at scale. Its dedicated kernels, network layer, snapshots, and E2B-facing API address the right problems, and our CubeAPI build plus 120 passing tests give the code review a solid base. Adoption still means becoming a virtualization operator. Start on isolated hosts, pin a release, disable unsafe credential paths, and prove recovery from stuck sandboxes and failed nodes.

Alternatives

ProjectWhat it isPick it when
E2BThe open infrastructure behind E2B's cloud sandboxes and client API.pick this instead when native E2B behavior and its surrounding ecosystem matter most.
Daytona gh↗A programmable infrastructure platform for isolated AI code execution environments.pick this instead when its hosting and workspace model fits better than CubeSandbox's microVM control plane.
gVisor gh↗A container sandbox runtime that inserts a user-space kernel between workloads and the host.pick this instead when you already operate containers and do not need an E2B-shaped agent platform.

What people are saying

  1. [github-trending] TencentCloud/CubeSandbox

Sources

  1. CubeSandbox README
  2. CubeSandbox v0.6.0 release
  3. Plaintext credential exfiltration report
  4. Non-positive command timeout report
  5. NeverTimeout expiration report

More self-hosted reviews

v2 · OpenShell · wigolo · Mindwtr · club-3090 · reclip · the whole board →