Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

docs: Add VM_BASE sandbox template documentation (#62671)

inkeep[bot]133d5681489e
diff --git a/docs/internal/sandboxes-setup-guide.md b/docs/internal/sandboxes-setup-guide.md
index d14a6798f6ef..632a7236f4c4 100644
--- a/docs/internal/sandboxes-setup-guide.md
+++ b/docs/internal/sandboxes-setup-guide.md
@@ -209,6 +209,18 @@ cd /path/to/posthog-code/packages/agent && pnpm build
| `MODAL_DOCKER` | `SANDBOX_PROVIDER=MODAL_DOCKER` | **Local development with Modal.** Same as `modal` but uses a separate Modal app (`posthog-sandbox-modal-docker-*`) so local image builds don't pollute the production app cache. When `LOCAL_POSTHOG_CODE_MONOREPO_ROOT` is set, the local agent packages are overlaid onto the image. |
| `docker` | `SANDBOX_PROVIDER=docker` | Local-only Docker containers (`DEBUG=True` required). No Modal account needed. This is the recommended option for local development. |
+### Sandbox templates
+
+Each sandbox is created from a template that determines its base image and capabilities.
+
+| Template | Image | Description |
+| --------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `DEFAULT_BASE` | `ghcr.io/posthog/posthog-sandbox-base` | Standard sandbox template (default). |
+| `NOTEBOOK_BASE` | `ghcr.io/posthog/posthog-sandbox-notebook` | Template for notebook functionality. |
+| `VM_BASE` | `ghcr.io/posthog/posthog-sandbox-vm` | Docker-in-Docker capable. Layers Docker engine, compose v2, and buildx on the base image. Includes an idempotent `start-dockerd` helper for on-demand dockerd. |
+
+`VM_BASE` uses the Modal VM runtime (real Linux kernel) instead of gVisor because `dockerd` cannot run under gVisor. When a sandbox is created with `template=SandboxTemplate.VM_BASE`, `ModalSandbox.create` automatically sets `experimental_options={"vm_runtime": True}`.
+
### Optional: local repository mounts (Docker only)
If you already have a repository checked out locally, you can skip cloning by