Back to Blog
RELEASE

Introducing microsandbox cloud

run the same microvm sandboxes from your laptop on our cloud. same cli, same sdk, same code, from $0.035/hr.

microsandbox cloud gives you a 4 vCPU, 8GB RAM, 64GB microVM for $0.035 an hour on shared compute, or $0.22 an hour dedicated.

It also runs the code you already wrote. If you use microsandbox on your laptop today, add your API key, set one environment variable, and the same sandbox runs on our infrastructure.

microsandbox has over 9k GitHub stars and almost 250,000 downloads a week as a way to run untrusted code locally, and it ships as a sandbox backend in Vercel's eve. But agents don't always live on a laptop. They need boxes that stay up, and teams need a hosted version without a rewrite.

Try it: run a real job local, then on cloud

This is the job from our launch video. It boots a microVM, clones a repo, installs it and runs its tests:

import { readFileSync } from "node:fs";
import { Sandbox } from "microsandbox";

const sb = await Sandbox.builder("ci")
  .image("python:3.12")
  .memory(512)
  .create();

// your agent's code
const job = await sb.shellStream(readFileSync("job.sh", "utf8"));
for await (const e of job) if (e.data) process.stdout.write(e.data);

Run it on your machine:

npm install microsandbox
npx tsx job.ts

Running locally needs KVM on Linux, WHP on Windows, or Apple Silicon on a Mac.

Now run the same file on cloud. Select the backend, add your key, and change nothing else:

export MSB_BACKEND=remote
export MSB_API_KEY="msb_..."
npx tsx job.ts

There's no daemon or separate client to run. SDKs are available for TypeScript, Python, Rust, Go and Ruby.

What every sandbox gets

Hardware isolation. Each sandbox is a microVM with its own kernel. Your agent's code doesn't share one with anything else.

Persistent or throwaway. Keep a sandbox's disk across stop, start and disk snapshots, like a small dev machine. Or spin one up per run and throw it away.

A root shell in your browser. Open the dashboard and you're in a root shell seconds after creating a sandbox, with no SSH keys to set up.

Secrets that stay out of the sandbox. Any API key your agent can read is one prompt injection away from leaking. On microsandbox, the key never enters the guest:

import { Sandbox } from "microsandbox";

const sb = await Sandbox.builder("secrets-demo")
  .image("python:3.12")
  .secret((s) =>
    s.env("GITHUB_TOKEN")
      .value(process.env.GITHUB_TOKEN!)
      .allow("api.github.com"),
  )
  .create();

const demo = await sb.shellStream(`
  echo "inside the sandbox: $GITHUB_TOKEN"
  curl -s -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/user
  curl -s -H "Authorization: Bearer $GITHUB_TOKEN" https://example.com
`);
for await (const e of demo) if (e.data) process.stdout.write(e.data);

Inside the sandbox, GITHUB_TOKEN holds a placeholder, $MSB_GITHUB_TOKEN. The real value only gets swapped in on requests to api.github.com. By default, a request carrying it anywhere else is blocked and logged. See the secrets docs for the other options.

Pricing

A 4 vCPU, 8GB RAM, 64GB sandbox costs $0.035 an hour on shared compute, or $0.22 an hour on standard, where CPU and memory are dedicated. Block storage volumes cost $0.15 per GiB-month.

Here's that same CPU and memory at published list rates:

E2B
0.33$/hr
Daytona
0.33$/hr
msbx cloud (standard)
0.22$/hr
msbx cloud (shared)
0.04$/hr
Per-hour price for 4 vCPU / 8 GiB at published list rates. Competitor figures are CPU and memory only, and exclude plan fees and storage

What's different on cloud

The everyday workflow is the same: create sandboxes, run commands, copy files, and use network rules and secrets with the same SDKs and CLI. A few things are still local-only, including published ports, forking and live snapshots. Cloud snapshots capture the disk of a stopped persistent sandbox. We're closing these gaps over the next few weeks, and the limitations page has the current list.

Get started

  1. Sign up and create an API key in the dashboard.
  2. Export MSB_BACKEND=remote and MSB_API_KEY.
  3. Run your existing code, or follow the quickstart.

Sign up during launch week for a $10 credit, good for 14 days on the free plan (up to 2 vCPU and 1GB of memory).