Ours: base
Every sandbox starts from a template. Ours is base: Ubuntu 24.04 with build-essential, git, curl, wget, ripgrep and jq; Python 3 with pip and venv; Node.js 22; Claude Code, Codex and OpenCode with their SDKs; Docker with Compose and Buildx; and a 1280×800 desktop with Google Chrome. You work as user, with sudo and no password. Its root filesystem is read-only and read straight from the server’s disk, so what a sandbox does not run costs it no memory, and neither the desktop nor Docker starts until something asks for it.
Each version of base is named by the sha256 of what it holds: the operating system, its packages and the guest kernel. We build a new one every month, and at once for a security fix of Chrome, the kernel or the packages. New sandboxes start on the newest; a sandbox, and a template saved from it, keep the base the sandbox started on.
Custom templates, saved from a sandbox
A custom template is a sandbox’s disk saved over our base. Set the sandbox up, by hand or by an agent, then create_template saves its disk as the next version of a name: my-app@1, then my-app@2. It saves files only: no memory, no running processes, and none of the sandbox’s command history or agent conversations, which new sandboxes start without.
The call answers in 28 to 49 ms with the version SAVING. A running sandbox goes on running, halted for some milliseconds while its disk is taken. Then the server checks the filesystem and shrinks it to what it holds, in a helper VM of its own, and uploads only the chunks that are yours to object storage, compressed and encrypted with a key for that version alone. A small sandbox’s version is READY 0.9 to 1.5 s after the call; in general it takes about 5 s, plus 10 s for each GiB of your own data. A READY version names its min_size, the smallest size whose disk holds what it saved.
Starting sandboxes from it
Name the template when you create a sandbox: my-app takes its newest READY version, my-app@3 exactly that one. Any server starts sandboxes from any version. The panel asks the servers that already hold the version first, and there a create takes 218 to 225 ms. A server that lacks it fetches it once, about 10 s for each GiB the version holds, and keeps it for the next. A sandbox from a template takes any size from the version’s min_size up.
Docker’s images live on the sandbox’s disk, so a template carries them: a sandbox made from it runs docker run on an image it never pulled. (Times here were measured through a panel 16 ms from the server.)
import time
from pethost.sandboxes import Sandboxes
sandboxes = Sandboxes() # reads PETHOST_TOKEN
sandbox = sandboxes.create_sandbox() # from base
sandboxes.run_command(
sandbox.sandbox_id,
command="python3 -m venv ~/venv && ~/venv/bin/pip install pandas && docker pull postgres:18",
)
version = sandboxes.create_template("my-app", sandbox_id=sandbox.sandbox_id)
name = f"my-app@{version.version}"
while sandboxes.get_template(name).state.name == "SAVING":
time.sleep(1)
copy = sandboxes.create_sandbox(name) # pandas and the postgres image are there
print(sandboxes.run_command(copy.sandbox_id, command="docker images postgres").stdout)pethost sandbox template save api-dev my-app # its disk, as the next version of my-app
pethost sandbox template show my-app # SAVING, then READY
pethost sandbox new --template my-app # a new sandbox from the newest versionVersions, room and price
A name holds up to 10 versions. A workspace saves one version at a time, and its versions together fit in its plan’s template room, counted as what they take in object storage, compressed:
| Plan | Template room |
|---|---|
| $20 a month | 5 GiB |
| $100 a month | 30 GiB |
| $500 a month | 175 GiB |
| $2,000 a month | 800 GiB |
Templates cost nothing beyond that room. Deleting a template, every version of its name, frees its room at once, and the sandboxes made from it go on running, pausing, stopping and resuming: object storage keeps a version until the last of them is deleted.
What templates do not do yet
There is no build from a Dockerfile yet: install in a sandbox and save it, as above. A template carries files, never running processes. To copy a sandbox with its memory and processes, a dev server running or an agent halfway through a task, fork it. Each sandbox, from a template or not, is its own Firecracker microVM with its own kernel. The templates guide has every call and field.
How it compares
On 21 November 2026, E2B built templates with its template builder, and Daytona made snapshots from an image or a Dockerfile, which Pethost does not do yet. boat.dev saves snapshots and charges $0.056 a snapshot a day past those its plan includes. A Pethost template costs nothing within your plan’s room.