Overview
Templates define the base environment for sandboxes. Each template is a squashfs image that serves as the read-only lower layer, with a per-VM writable overlay on top.Available Templates
| Template | Description | Size | Includes |
|---|---|---|---|
base-ubuntu | CLI environment | ~400MB | Bun, Node.js, common dev tools, SSH server |
desktop-ubuntu | Full desktop environment | ~1GB | XFCE4, KasmVNC, Firefox ESR, Plank dock, xdotool, scrot, imagemagick |
Base Ubuntu (base-ubuntu)
The default template for headless/CLI workloads. Includes:
- Bun runtime
- Node.js
- SSH server
- Common dev tools (git, curl, wget, etc.)
- RunTools runtime (agent execution engine)
Desktop Ubuntu (desktop-ubuntu)
Full GUI environment for browser automation, computer-use agents, and visual tasks:
- Everything in
base-ubuntu, plus: - XFCE4 desktop with Orchis Dark theme
- KasmVNC (web-based VNC, no client needed)
- Firefox ESR
- Plank Reloaded dock (macOS-style)
- xdotool, scrot, imagemagick (for computer-use)
- Accessible via
https://6901-{sandboxId}.sandboxes.runtools.ai
Using Templates
How Templates Work
Templates use an OverlayFS architecture:- The base image (squashfs) is shared across all VMs of the same template type
- Each VM gets its own sparse overlay that only stores changes
- This means 10 VMs share one ~400MB base image, each adding only their modifications
- The overlay starts at ~0 bytes and grows as files are modified
Custom Templates
Custom templates (Dockerfile-based) are planned but not yet available. The template build pipeline is not yet connected. For now, use
base-ubuntu and install packages at runtime.Workaround: Install at Runtime
Until custom templates are available, install packages after sandbox creation:Planned: defineSandbox()
The SDK provides adefineSandbox() helper for declarative sandbox definitions:
sandboxes/ml-env.ts
runtools deploy --sandboxes-only. This creates the sandbox with the specified configuration but doesn’t install custom packages (that requires custom templates).
Best Practices
Use base-ubuntu for most workloads
Use base-ubuntu for most workloads
The base template has everything you need for CLI/headless tasks. It boots faster and uses less resources.
Use desktop-ubuntu only when you need GUI
Use desktop-ubuntu only when you need GUI
Desktop sandboxes use 2x memory and take slightly longer to boot. Only use for browser automation or visual tasks.
Snapshot after installing packages
Snapshot after installing packages
If you install packages at runtime, create a snapshot so you can resume without reinstalling.