Built-in templates
A template starts a sandbox that is ready to work in: a project already running behind a preview URL, a code interpreter, a browser or a desktop. Hermitbox ships three kinds of built-in templates:
- Runtime and tool plans (
hermitbox template create <name>): released container images for code interpreters, headless browsers, X11 desktops, SSH and bucket mounts, and Rivet’ssandbox-agent. - Starter projects (
hb.sandbox({ template: '<name>' })): 54 pinned, tested container starters prepared on first use and forked per sandbox with a ready preview URL. - Git repositories (
hermitbox template from <repo>): inspects an HTTPS repository or local checkout, infers its runtime and start command, and prepares a template from it.
All built-in templates run on the container tier. The node’s image policy must admit the
template’s image, and built-in plans never weaken host policy.
Runtime and tool plans
These give a sandbox a tool to drive: a kernel, a browser, a desktop, SSH or a bucket mount.
Create one with hermitbox template create <name>. Each uses Hermitbox’s released image for its
version by default; --image <image> selects an operator-built one.
| Template | What it includes | How you use it | Guide |
|---|---|---|---|
python-interpreter |
CPython 3.12, prestarted IPython kernel, NumPy, pandas, Matplotlib, SciPy, scikit-learn, Requests, Pillow | box.python(), hermitbox sandbox python |
Code interpreters |
node-interpreter |
Node.js 24, prestarted IJavascript kernel, Chart.js | box.javascript() |
Code interpreters |
browser |
Headless Chromium shell, playwright-core, loopback CDP proxy |
box.browser(), box.browser.screenshot() |
Browser and desktop |
desktop |
Xvfb, JWM, x11vnc, noVNC, xdotool, scrot, editable note preview |
box.desktop(), box.previewUrl |
Browser and desktop |
tools |
OpenSSH (sshd), rclone, FUSE mount support |
box.ssh(), mounts at creation, box.mounts() |
Browser and desktop |
sandbox-agent |
Rivet’s sandbox-agent server on private port 3000 |
Rivet runner / private port agent |
Rivet agent harness |
python-interpreter
Prepares a container template from ghcr.io/hermitbox/hermitbox-python-interpreter:<version> with
a prestarted Python kernel (ipykernel) and scientific libraries (numpy, pandas, matplotlib,
scipy, scikit-learn, requests and PIL). Running hermitbox sandbox python without a
sandbox ID creates a container sandbox from this template.
hermitbox template create python-interpreterSee Code interpreters for stateful execution, chart output, process-tier kernels and package inventories.
node-interpreter
Prepares a container template from ghcr.io/hermitbox/hermitbox-node-interpreter:<version> with
Node.js 24, a prestarted IJavascript kernel and Chart.js support. Use box.javascript() on a
sandbox created from it to evaluate persistent JavaScript contexts and capture charts.
hermitbox template create node-interpreterSee Code interpreters for SDK examples and package notices.
browser
Prepares a container template from ghcr.io/hermitbox/hermitbox-browser:<version> with three spare
ports and Chromium’s headless shell (playwright-core) running with Chromium’s sandbox enabled.
Sandboxes expose box.browser.screenshot() and expiring Chrome DevTools Protocol (CDP) URLs
through box.browser().
hermitbox template create browserOn the process tier, the verified process tool bundle provides box.browser() without creating a
container template. See Browser and desktop for host seccomp
and namespace prerequisites.
desktop
Provides a full X11 desktop (Xvfb, JWM, x11vnc, noVNC, xdotool and scrot) with three spare
ports, reached through box.desktop() as an expiring noVNC URL and computer-use actions.
- Calling
hb.sandbox({ template: 'desktop' })orhermitbox template create desktopuses the pinned Debian GUI starter project, which also serves an editablenotes.txtpreview on port 8000 alongside the graphical desktop. - Passing
--image <image>tohermitbox template create desktop --image <image>uses the operator-built or releasedhermitbox-desktopimage directly.
See Browser and desktop for mouse, keyboard, screenshot and process-tier desktop details.
tools
Prepares a container template from ghcr.io/hermitbox/hermitbox-tools:<version> with three spare
ports, OpenSSH (sshd) and rclone. Use it for interactive SSH access (box.ssh()) and S3 or R2
object-store bucket mounts (mounts at creation, listed by box.mounts()). Bucket mounts
require explicit host opt-in.
hermitbox template create toolsSee Browser and desktop for SSH authentication, edge wake and mount policy.
sandbox-agent
Registers a template spec via POST /v1/templates and warms every active container node with
ghcr.io/hermitbox/hermitbox-sandbox-agent:<version>. Each sandbox starts sandbox-agent server
on private TCP port 3000 (agent) with HOME and XDG directories under /data, and no provider
credentials inside the image.
hermitbox template create sandbox-agentSee Rivet agent harness for connecting a Rivet runner.
Starter projects
Ask for any starter by name on a host that runs containers, and you get a working project with its preview URL. The first request prepares a warm project snapshot on an eligible node: it installs the locked dependencies and runs the build and smoke tests. Requests that arrive meanwhile share that preparation, and the fleet warms copies on other eligible nodes.
const box = await hb.sandbox({ template: 'nextjs' })
console.log(box.previewUrl)box = hb.sandbox(template='nextjs')
print(box.preview_url)use hermitbox::SandboxOptions;
let sandbox = hb.create_sandbox(SandboxOptions::new().template("nextjs")).await?;
println!("{:?}", sandbox.preview_url().await);Each sandbox forks its own copy, starts its development server and waits until it is ready, then
returns box.previewUrl (box.preview_url in Python, sandbox.preview_url() in Rust). If it never
gets ready, the error names the sandbox so you can read its logs or delete it.
Every starter has an AGENTS.md in its working directory listing its run, test and build commands,
so a coding agent knows how to work on it. To build a starter ahead of time or select a different
digest-pinned image, run hermitbox template create <name> [--image <image>].
Frontend and full-stack web
All ten web starters run on Hermitbox’s pinned Node image, verify locked dependencies and production builds during warm preparation, and hot-reload edits in each fork.
| Template | Stack | Port | Edit to update |
|---|---|---|---|
nextjs |
Next.js (App Router) | 3000 | app/page.jsx |
vite-react |
React with Vite | 5173 | src/App.jsx |
vue |
Vue with Vite | 5173 | src/App.vue |
sveltekit |
SvelteKit (Node adapter) | 5173 | src/routes/+page.svelte |
astro |
Astro static site | 4321 | src/pages/index.astro |
nuxt |
Nuxt (Nitro Node server) | 3000 | app/app.vue |
react-router |
React Router in framework mode | 5173 | app/routes/home.jsx, app/routes.ts |
angular |
Angular standalone with Vite | 5173 | src/app.html, src/app.ts |
solidstart |
SolidStart (Nitro Node server) | 5173 | src/app.jsx |
expo-web |
Expo SDK for web (Metro) | 8081 | App.jsx |
nextjs: forks start the Next.js development server with hot reload onapp/page.jsx.vite-reactandvue: test the production Vite build during warming and serve Vite dev previews on port 5173.sveltekit: the warm build serves the production Node adapter’s output over HTTP to check the home page; forks run Vite dev on port 5173. Usenpm run buildandnpm startfor production.astro: tests the production home page during warming and serves Astro dev on port 4321. Runnpm run buildto writedist/andnpm run previewto serve it.nuxt: forks serve Vue hot reload on port 3000. Runnpm testto build and exercise the Nitro server, ornpm run buildfollowed bynpm start.react-router: server-rendered React Router with Fast Refresh; the build tests the production route handler. Runnpm startto serve production output.angular: Angular standalone component served with Vite. Runnpm testto compile and check,npm run buildto writedist/andnpm run previewto serve it.solidstart: server-rendered Solid application. Runnpm testto build and exercise the Nitro server, ornpm run buildandnpm startfor production.expo-web: React Native Web components via Expo. Runnpm testto check the Metro production export andnpm run buildto write the static site todist/.
JavaScript and TypeScript backends
| Template | Stack | Port | Edit to update |
|---|---|---|---|
node |
Node built-in HTTP server, test runner and watcher | 3000 | store.mjs |
express |
Express HTTP API | 3000 | app.mjs |
hono |
Hono HTTP API | 3000 | app.mjs |
fastify |
Fastify HTTP API | 3000 | app.mjs |
nestjs |
NestJS TypeScript API | 3000 | src/app.controller.ts |
bun |
Bun TypeScript HTTP server | 3000 | app.ts |
deno |
Deno TypeScript HTTP server | 3000 | app.ts |
node: zero-dependency Node server usingnode --watchandnode --test.express,honoandfastify: share the pinned Node image, install locked dependencies and test the root JSON route over HTTP. Runnpm testfor routes andnpm run buildto check entry points.nestjs: runs Nest in watch mode. Runnpm testto check the API andnpm run buildto compile it.bunanddeno: run all application code on the selected pinned runtime with native tests and a watched preview on port 3000.
Python web
All four Python starters serve port 8000, include a runnable unittest suite, and reload edits.
Framework starters ship a preinstalled, hash-locked .venv in the warm snapshot.
| Template | Stack | Port | Edit to update |
|---|---|---|---|
python |
Python standard-library HTTP server | 8000 | public/index.html |
flask |
Flask with reloader | 8000 | app.py |
fastapi |
FastAPI with Uvicorn reload | 8000 | app.py |
django |
Django watched by watchfiles |
8000 | app.py |
Native and compiled backends
Each runs on a digest-pinned Alpine language image (Rails on Debian Bookworm), serves port 3000,
and includes source tests and an AGENTS.md with its run and build commands.
| Template | Stack | Port | Edit to update |
|---|---|---|---|
go |
Go HTTP server (auto-rebuild) | 3000 | main.go |
ruby |
Ruby HTTP server | 3000 | message.rb |
rails |
Ruby on Rails MVC API | 3000 | app/controllers/greetings_controller.rb |
php |
PHP built-in HTTP server | 3000 | public/index.php |
laravel |
Laravel PHP API | 3000 | app/Http/Controllers/GreetingController.php |
rust |
Rust HTTP service (locked Cargo) | 3000 | src/main.rs |
axum |
Axum Rust API (locked Cargo) | 3000 | src/main.rs |
java |
JDK 21 HTTP server (watched rebuild) | 3000 | Main.java |
spring-boot |
Spring Boot MVC API (warmed Maven wrapper) | 3000 | src/main/java/example/GreetingController.java |
dotnet |
.NET 10 socket server (watched rebuild) | 3000 | Program.cs |
aspnet |
ASP.NET Core API (watched rebuild) | 3000 | Program.cs |
phoenix |
Elixir Phoenix web API | 3000 | lib/hermitbox_web/greeting_controller.ex |
go,rust,axum,java,spring-boot,dotnetandaspnet: rebuild automatically on source edits through their watched development scripts.rails: reloads the greeting controller on the next request; its checksummed bundle covers both Linux architectures.laravel: runphp .hermitbox/composer.phar --no-plugins testfor project tests andphp artisan optimizeto build the production configuration.phoenix: recompiles edited modules on the next request. Runmix testfor tests orMIX_ENV=prod mix release --overwriteto build a standalone OTP release.
Databases and caches
Each database starter gives every fork its own persistent database files under /data and a live
HTTP preview for inspecting queries or data.
| Template | Engine and transport | Port | Edit or update |
|---|---|---|---|
sqlite |
Embedded SQLite file (project.sqlite) |
8000 | query.sql |
duckdb |
Embedded DuckDB file (project.duckdb) |
8000 | query.sql |
postgres |
Fork-local PostgreSQL on loopback (DATABASE_URL) |
3000 | Row 1 of messages via psql |
redis |
Fork-local Redis on loopback (REDIS_URL) |
3000 | message key via redis-cli |
mysql |
Fork-local MySQL on private Unix socket | 8000 | query.sql |
mongodb |
Fork-local MongoDB Community on private Unix socket | 8000 | query.json |
pgvector |
Fork-local PostgreSQL with pgvector extension |
3000 | query.sql |
sqliteandduckdb: seed a database and serve a read-only JSON preview of up to 100 rows fromquery.sql. Local project scripts can open the same file for writing.postgresandredis: start a fork-local service on loopback with a JSON preview and a bundled client (psqlorredis-clidocumented inAGENTS.md). To attach PostgreSQL or Redis to another starter project instead, see Composable services.mysql: serves up to 100 SQL result rows fromquery.sql; connect with the MySQL client over the private Unix socket listed inAGENTS.md.mongodb: runs on a self-hosted node pulling the pinned upstream MongoDB Community image. Editquery.jsonto filter, project or sort the fork’s inventory documents.pgvector: executesquery.sqlagainst PostgreSQL’s native vector extension to show the nearest point; connect with the bundledpsqlclient to add data and indexes.
Vector stores
Both starters run a persistent vector database inside the fork with an editable similarity-search preview on port 8000 comparing three coordinates per point.
| Template | Vector store and native port | Preview port | Edit to update |
|---|---|---|---|
qdrant |
Qdrant on loopback port 6333 | 8000 | vectors.json |
typesense |
Typesense on loopback port 8108 | 8000 | vectors.json |
Edit vectors.json to update the seeded points on the next request, or talk directly to the native
database API from inside the fork. The preview returns a point’s title when supplied and otherwise
its native ID.
Notebooks, local search and AI
All eight starters run entirely inside the fork without external provider accounts or API keys.
| Template | Stack | Port | Edit to update |
|---|---|---|---|
jupyter |
JupyterLab with NumPy, pandas, Matplotlib, SciPy, scikit-learn | 8000 | project/sales.csv, project/analysis.ipynb |
langgraph |
Local search graph backed by SQLite FTS5 | 8000 | documents.json, pipeline.py |
llamaindex |
Local vector index with TF–IDF embeddings | 8000 | documents.json, pipeline.py |
llama-cpp |
Local CPU llama.cpp server (SmolLM2 105 MB GGUF) |
8080 | public/index.html |
ai-sdk-chat |
Vercel AI SDK chat on fork-local CPU model | 8000 | instructions.txt, public/index.html |
mastra |
Mastra chat on fork-local CPU model | 8000 | instructions.txt, public/index.html |
openai-agents |
OpenAI Agents SDK chat on fork-local CPU model | 8000 | instructions.txt, public/index.html |
crewai |
CrewAI Flow chat on fork-local CPU model | 8000 | instructions.txt, flow.py, public/index.html |
jupyter: the warm build executesproject/analysis.ipynband checks both the total and the plot. Read each fork’s login token withawait box.read('.hermitbox/jupyter/access-token')and paste it into the preview’s login form.langgraphandllamaindex: serve a search page and a JSON endpoint (search?q=...). Editdocuments.jsonto update the corpus immediately, orpipeline.pyto change retrieval.llama-cpp: initial preparation fetches and verifies the digest-pinned 105 MB SmolLM2 GGUF model. Forks start offline, serve a chat page and expose an OpenAI-compatiblev1/chat/completionsendpoint on CPU.ai-sdk-chat,mastra,openai-agentsandcrewai: bundle the verified local CPU model and the selected SDK in the same fork. Each readsinstructions.txtfor every message and serves edits topublic/index.htmlon refresh.
Browser automation and desktop
| Template | Stack | Port | Host requirement | Edit to update |
|---|---|---|---|---|
playwright |
Playwright with sandboxed Chromium | 8000 | browser-sandbox |
page.html |
puppeteer |
Puppeteer with sandboxed Chromium | 8000 | browser-sandbox |
page.html |
browser-use |
Python browser-use with sandboxed Chromium |
8000 | browser-sandbox |
page.html, scenario.py |
desktop |
X11 desktop (box.desktop()) with note editor and terminal |
8000 | Container tier | notes.txt |
playwright,puppeteerandbrowser-use: run on a container node that reports thebrowser-sandboxguarantee. Editpage.htmland select Run browser test in the preview to drive Chromium as an ordinary user, click the sample counter and return a screenshot.desktop: serves the contents ofnotes.txtin its port-8000 preview whilebox.desktop()opens the graphical X11 session with an expiring access URL. Editnotes.txtthrough the file API or save it from the graphical editor.
Composable services
To run a database or cache next to your app, in the same sandbox, pass services: ['postgres'] or
services: ['redis'] when you create it from a compatible starter project or imported repository:
const box = await hb.sandbox({ template: 'nextjs', services: ['postgres'] })box = hb.sandbox(template='nextjs', services=['postgres'])postgres: runs a fork-local PostgreSQL under/dataon container loopback and setsDATABASE_URL.redis: runs a fork-local Redis on container loopback with its append-only log under/dataand setsREDIS_URL.
Each starter with a service warms its own snapshot, and the service starts and answers before the
application’s entrypoint runs. Composable services work with the catalog’s Node, Python and
Alpine language projects, llama-cpp, desktop, and Git repositories imported on those pinned
images. See Databases and caches for
details.
Git repositories and coding agents
- Git repositories:
hermitbox template from <repo>builds a template from an HTTPS repository or local Git checkout, recognizing Node, Python, Go, Ruby (Rack), PHP, Rust (Cargo), Java (Maven or standalone), .NET, devcontainers and Dockerfiles. See Start a Git repository. - Coding agents:
hermitbox create <agent>(hermitbox create --list) launches a coding agent such as Codex in a cached sandbox across VM, gVisor, container or process tiers. See Coding agents.
Next steps
- Templates: how templates, versions and snapshots work.
- Templates from code: build custom templates with
hb.template(), compose services and import Git repositories. - CLI reference: every
hermitbox templatesubcommand and flag.
$curl -fsSL https://hbx.sh | shInstall Hermitbox and set it up for me