Multi-user personal Linux playgrounds for Cloudron, powered by unkernel.
Boot isolated Alpine Linux, Debian 13, or BusyBox sandboxes in under a second — with Cloudron SSO login, multi-core SMP, AES-256-GCM encrypted secrets, persistent server-side storage in /app/data, instant instance switching, and automatic Cloudron backups.
- Desktop Video Showcase (31s, 1280×800 MP4):
docs/showcase.mp4 - Mobile PWA Video Showcase (30s, Termius-Style Portrait MP4):
docs/showcase-mobile.mp4
![]() Installable Mobile PWA (iOS & Android) |
![]() AES-256-GCM Secret Vault (Write-Only, Global & Instance Overrides) |
- Personal Dev & Ops Sandbox on Cloudron: Standard Cloudron containers run unprivileged with a read-only root filesystem. Kernbox gives you full
root/sudo,apk add/apt-get install, and real Linux 7.x kernel semantics inside a safe, unprivileged Cloudron app. - Self-Hosted Code Sandbox for AI Agents & Automations (REST API + MCP): Mint scoped Personal Access Tokens (
kbx_...) and connect Claude, Antigravity, Cursor, n8n, or iOS Shortcuts via the built-in Streamable HTTP MCP server (/mcp) orPOST /api/instances/:id/execto spin up isolated Linux sandboxes on demand. - Always-On Background Services & Isolated CI Runners: Enable Keep running (
∞), Auto-start after restart (↻), and a Startup Command (e.g.sh /work/boot.shor a Gitea:hostActions runner) running inside a dedicated⚡ Startuptab with live 128 KiB scrollback. - Multi-Distro Experimentation & Portable Snapshots: Keep separate persistent instances side-by-side (
alpine-lab,debian-tools,scratch-box), clone or reset OS overlays while preserving/work, or export/import entire environments as compact sparse.kernbox.tar.gzarchives (excluding secrets). - Web App Prototyping with Private Preview & Public Share Links: Spin up a Python, Node.js, or Go dev server on
127.0.0.1:<port>inside your VM, preview it privately over vsock (/preview/<id>/<port>/), or publish a revocable, time-limited public URL (/share/<token>/) isolated in a strictCSP: sandbox. - Persistent Cloud Shell & Mobile PWA: Install Kernbox as a Termius-style PWA on iOS & Android or reconnect from desktop with 128 KiB server-side scrollback replay and zero shared state between Cloudron users.
- Hybrid Compute (☁️ Server + 💻 Browser-VM): Choose per instance to run on your Cloudron server (always-on, MCP, REST
/exec, public shares, NetBird) or offload 100% of CPU & RAM locally to the user's browser viaunkernel/web(OPFS/IndexedDB persistence, HTTP Range distro streaming from Cloudron, SSRF-safe Wisp WebSocket bridge, and bidirectional/worksync). - Native Graphical Linux Desktop (
🖥️ Desktopvia/dev/fb0): Enable a native framebuffer display (800×600,1024×640,1280×720) and 1:1 mouse/keyboard input per instance — rendering at 60 FPS directly from localSharedArrayBufferin Browser-VMs or streaming compressed deflate-raw deltas over WebSocket (WS /ws/instances/:id/display) from Server-VMs, with a built-in 1-click Alpine/Debian Xorg + Openbox installer. - Cloudron SSO & Strict Multi-User Isolation: Uses Cloudron's native
oidcaddon (OpenID Connect with PKCE + RS256 JWKS verification). Every user has their own isolated directory under/app/data/users/<user>/instances/. - REST API,
/exec, OpenAPI 3.1 & Built-in MCP Server (/mcp):- Scoped Personal Access Tokens (
kbx_...withread,exec, orfullscopes, stored SHA-256 hashed in/app/data/tokens.json, unable to read/modify secrets or mint new tokens). - Synchronous
POST /api/instances/:id/execwithshell,cwd,autoStart, configurabletimeoutMs, and output truncation caps. - Built-in JSON-RPC 2.0 Streamable HTTP MCP server at
POST /mcpexposing 10 scope-filtered sandbox tools, plus OpenAPI 3.1 spec atGET /api/openapi.json. - Address instances by either their copyable full ID (
devbox-1a2b3c4d, shown directly in the sidebar & Settings) or their unique box name (devbox) across REST API,/preview, and MCP.
- Scoped Personal Access Tokens (
- Always-On, Auto-Boot & Startup Commands: Per-instance Keep running (exempt from idle auto-stop), Auto-start after Cloudron/app restart, and an optional Startup Command (with 1-click
/work/boot.shand Gitea Runner presets) executed in/workinside a dedicated⚡ Startuptab. - Sparse Instance Export & Chunked Import (
.kernbox.tar.gz): Stream any instance (manifest.json, sparse-encodedkwdata.imgOS overlay, and/work, intentionally excluding secrets & Tailscale credentials) as a compact.kernbox.tar.gzarchive and re-import it via 4 MiB chunked uploads (Cloudflare 100 MB proxy-safe) with Zip-Slip and symlink escape protection. - Private Port Preview & Public Share Links (
/share/<token>/): Preview guest loopback HTTP ports privately over vsock or publish revocable, optionally expiring public links with strictCSP: sandbox(noallow-same-origin),X-Robots-Tag: noindex, cookie stripping, and Cloudflare-friendly offline pages. - Multi-Core SMP & Wasm JIT Performance: Runs each VM in its own
SharedArrayBuffer-backed worker thread with 1–4 SMP vCPUs, runtime aarch64-to-Wasm JIT compilation,TCP_NODELAYzero-latency WebSockets, and Node.js V8 compile cache. - AES-256-GCM Encrypted Secret Vault: Per-user encrypted secrets (HKDF-SHA256 derived keys + authenticated GCM with user/scope/name AAD). Write-only UI with global secrets, per-instance overrides, and bulk
.envpaste import. Injected RAM-only as$ENV_VARin shells and live read-only files at/run/kernbox/secrets/<NAME>— never stored inkwdata.img, cloned, or exported. - Server-Side Persistent Storage & Backups:
- OS Overlay (
kwdata.img): Sparse 4 GiBext4disk per instance — installed packages and dotfiles survive restarts and are included in Cloudron backups. - Live
/workWorkspace: Mounted at/workover 9p directly onto/app/data/.../work, backed up as ordinary files by Cloudron.
- OS Overlay (
- Termius-Style Mobile PWA: Installable Progressive Web App (
manifest.webmanifest+ Service Worker + iOS/Android icons) with a sticky extra-keys bar (⚡Snippets,Paste,Copy,ESC,TAB, stickyCTRL/ALT,^C, arrow keys, shell symbols), iOS keyboard-awarevisualViewportsizing, swipeable slide-over instance drawer, and native bottom-sheet menus. - ARMv8.3 Binary Compatibility Helper (
kernbox-compat): Built-in guest command that patches ARMv8.3-AFEAT_LRCPC(ldapr/ldaprb/ldaprh) instructions in third-party aarch64 ELF binaries to semantically equivalent ARMv8.0-A (ldar/ldarb/ldarh) instructions in-place with constant ~2 MiB streaming memory. - Private Inter-VM Mesh (
<name>.kernbox.local): Zero-config internal TCP networking strictly between a user's own running VMs over vsock (e.g.curl http://api.kernbox.local:8080orredis.internal:6379) — isolated per Cloudron user with no host port exposure. - Per-Instance Tailscale / Headscale & NetBird Mesh VPN: Connect individual VMs directly to Tailscale, Headscale, or NetBird (Cloud or self-hosted) via interactive browser SSO login or AES-256-GCM encrypted auth/setup keys (
tailscale.enc.json/netbird.enc.json, never exported or cloned), with persistent encrypted node identities, SSRF-checked custom control/management URLs, live Exit Node switching (Tailscale), andForce Relayover HTTPS/WebSocket (NetBird). - SSRF-Safe Outbound Networking (TCP + UDP): In-process authenticated Wisp v1 relay forwarding TCP and UDP while blocking loopback, RFC1918, link-local/metadata, NAT64, IPv6 ULA, and Cloudron-internal IP ranges by default.
Browser / Mobile PWA (xterm.js + /work Files + Secret Vault + API/MCP UI)
OR AI Agents / n8n / curl (Authorization: Bearer kbx_... -> REST API & /mcp)
│ HTTPS + WebSocket (Cloudron OIDC Cookie or Scoped Bearer Token)
▼
Kernbox Node.js >= 24 Server (unprivileged cloudron:cloudron)
├── AuthService → Cloudron OIDC (PKCE + RS256 JWKS) + Scoped API Tokens
├── SecretVault → AES-256-GCM + HKDF-SHA256 per-user vault
├── Tailscale & NetBird → AES-256-GCM encrypted credentials/identities (tailscale.enc.json / netbird.enc.json)
├── PublicShareStore → Revocable /share/<token>/ vsock HTTP proxies (CSP sandbox)
├── Archive Engine → Streaming sparse .kernbox.tar.gz export + 4 MiB chunked import
├── MCP & OpenAPI → Streamable HTTP JSON-RPC 2.0 (/mcp) + /api/openapi.json
├── VmManager → 1 SMP WorkerKernel thread per running VM + auto-boot + Tailscale VPN
│ ├── Base distro → Read-only /app/code/distros/alpine.erofs (shared)
│ ├── OS overlay → /app/data/users/<uid>/instances/<id>/kwdata.img
│ ├── 9p /work → /app/data/users/<uid>/instances/<id>/work/
│ ├── 9p secrets → RAM-only read-only MemoryFs at /run/kernbox/secrets
│ ├── Host commands → kernbox-compat (ARMv8.3 LDAPR -> ARMv8.0 LDAR)
│ └── PTY & Exec → Startup tab + shell tabs (128 KiB scrollback) + /exec
└── SafeWispServer → Authenticated Wisp relay: SSRF-safe internet + per-user *.kernbox.local mesh
- A Cloudron server (v10.0+ required for Community App
CloudronVersions.jsoninstalls) - For CLI installs/builds: the Cloudron CLI (
npm install -g cloudron) logged into your Cloudron instance
In your Cloudron Dashboard (App Store → Custom / Community App) or via the Cloudron CLI, use the CloudronVersions.json URL:
https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.json
Or via Cloudron CLI:
cloudron install --versions-url https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.json --location kernbox.yourdomain.comOr directly from the pre-built GHCR image:
cloudron install --image ghcr.io/patattzel/kernbox:latest --location kernbox.yourdomain.comgit clone https://github.com/patattzel/kernbox.git
cd kernbox
# Build and push your own Cloudron app image (pre-bundles Alpine Linux)
cloudron build --set-repository ghcr.io/<your-user>/kernbox
# Install onto your Cloudron server (automatically wires OIDC SSO + /app/data)
cloudron install --location kernbox.yourdomain.comOptional: Pre-bundle Debian too By default, the Docker build pre-bundles Alpine (~4 MB) into
/app/code/distrosso Alpine boots instantly offline, while Debian (~78 MB) downloads on first use into/app/data/cache/distros. To bake both into the image:docker build --build-arg PREFETCH_DISTROS="alpine debian" -t ghcr.io/<your-user>/kernbox:0.13.0 .
On first boot, start.sh creates /app/data/env.sh. Edit it via the Cloudron File Manager and restart the app to adjust quotas or defaults:
| Variable | Default | Description |
|---|---|---|
MAX_INSTANCES_PER_USER |
12 |
Maximum stored instances per user |
MAX_RUNNING_PER_USER |
3 |
Maximum concurrently running VMs per user |
MIN_MEMORY_MIB |
128 |
Minimum selectable guest RAM (MiB) |
DEFAULT_MEMORY_MIB |
512 |
Default guest RAM for new instances (MiB) |
MAX_MEMORY_MIB |
2048 |
Maximum selectable guest RAM (MiB) |
DEFAULT_CPUS |
2 |
Default SMP vCPU count for new instances |
MAX_CPUS_PER_INSTANCE |
4 |
Maximum selectable SMP vCPUs per instance (up to host CPU count) |
IDLE_TIMEOUT_MINUTES |
30 |
Default idle auto-stop timeout in minutes (0 disables globally; also overrideable per instance via Keep running) |
MAX_UPLOAD_MB |
50 |
Maximum /work file upload size (MiB) |
MAX_IMPORT_MB |
500 |
Maximum .kernbox.tar.gz instance archive import size (MiB) |
MAX_SNAPSHOTS_PER_INSTANCE |
8 |
Maximum saved live RAM+disk snapshots (checkpoints) per instance |
ALLOW_PRIVATE_NETWORK |
false |
Allow guests to connect to RFC1918/loopback IPs (keep false on multi-user servers!) |
SECRETS_MASTER_KEY |
(auto) | Optional 64-char hex master key for AES-256-GCM Secret Vault (defaults to /app/data/.secrets-master-key) |
- Open 🔌 API / MCP in the sidebar footer (or
⋯ → API Tokens & MCPon mobile) and generate a scoped Personal Access Token (kbx_...):read— list/inspect instances, list VM snapshots, read/workfiles, export.kernbox.tar.gzarchivesexec— start/stop instances, capture/restore/delete VM snapshots, runPOST /api/instances/:id/exec, upload/delete/workfiles, create/revoke public share linksfull— full instance lifecycle (create, update, clone, reset, import, delete)
- Run commands over HTTP using either the instance's full ID (
devbox-1a2b3c4d) or its unique name (devbox), with optionalautoStart: true:curl -s -X POST "https://kernbox.yourdomain.com/api/instances/devbox/exec" \ -H "Authorization: Bearer kbx_YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"command":"uname -a && nproc","shell":true,"cwd":"/work","autoStart":true}'
- Connect any MCP client (Antigravity, Claude, Cursor, n8n) directly to
https://kernbox.yourdomain.com/mcp:{ "mcpServers": { "kernbox": { "url": "https://kernbox.yourdomain.com/mcp", "headers": { "Authorization": "Bearer kbx_YOUR_TOKEN" } } } } - Full machine-readable API spec is served at
GET /api/openapi.json.
Every running instance with networking enabled can connect directly over TCP to your other running instances — strictly isolated to your own Cloudron account, with zero port forwarding or configuration:
# From your "frontend" VM, call an API or database running on your "backend" VM:
curl http://backend.kernbox.local:8080/health
nc -zv redis.internal 6379Both <name>.kernbox.local (slugified box name or full instance ID) and <name>.internal are supported; copy the exact hostname from Settings → Private Mesh DNS.
Open Settings → 🌐 Tailscale / Headscale Mesh VPN on any instance to join it directly to your tailnet (powered by unkernel's pure-JS Tailscale engine over WebSocket + DERP — no UDP or privileged container required):
- Interactive Login: Enable Tailscale, start the VM, and click the
TS Login ↗chip in the top bar (or Sign in to Tailscale ↗ in Settings). - Pre-Auth Key (Headless / Always-On): Paste a reusable or one-off Tailscale/Headscale auth key — stored write-only and encrypted with AES-256-GCM in
tailscale.enc.json(excluded from clones and.kernbox.tar.gzexports). - Headscale & Exit Nodes: Configure a custom
https://Control URL (SSRF-validated), toggle Accept routes / Ephemeral, switch Exit Nodes live without restarting the VM, or reset the node identity at any time.
Open Settings → 🐦 NetBird Mesh VPN on any instance to connect it to NetBird Cloud or your self-hosted NetBird management server over unkernel's built-in /dev/net/tun kernel interface:
- Zero Bloat & Verified Binary: On first use, Kernbox downloads and caches the official static
netbirdLinux ARM64 binary once into/app/data/cache/bin/(pinned SHA-256 verified) and mounts it read-only into VMs — taking zero space insidekwdata.imgand makingnetbird statusavailable directly in your shell. - Interactive SSO Login or Encrypted Setup Key: Leave Setup Key blank for 1-click
NB Login ↗browser SSO login, or paste a Setup Key (encrypted AES-256-GCM innetbird.enc.jsonand passed viaNB_SETUP_KEY, never CLI argv). Peer identity & WireGuard keys live RAM-only in/var/lib/netbirdand persist encrypted at rest (never exported or cloned). - Self-Hosted & Cloudron-Friendly: Supports custom
https://Management URLs (SSRF-validated), Force Relay over HTTPS/WebSocket (on by default), Disable DNS, Block inbound, and Reset Node Identity.
- Open 🔑 Secrets in the sidebar footer for global secrets (shared across all your instances) or
⋯ → Secretsin the top bar for instance-specific secrets/overrides. - Add keys individually or expand Bulk import from
.envsnippet to paste multipleKEY=VALUElines at once. - Inside any shell in your playground:
echo "$OPENAI_API_KEY" # injected into new shell environments cat /run/kernbox/secrets/OPENAI_API_KEY # live read-only RAM-only file (updates within ~1s)
unkernel's kwemu CPU emulator targets baseline ARMv8.0-A (plus FP, AdvSIMD, AES, PMULL, SHA, CRC32, and LSE atomics). Standard Alpine (apk) and Debian (apt) packages work out of the box, while some prebuilt third-party binaries compiled with ARMv8.3-A FEAT_LRCPC (ldapr) instructions (for example Google's Antigravity CLI agy) can trigger Illegal instruction (SIGILL).
Every Kernbox VM includes the built-in kernbox-compat command to rewrite LDAPR → LDAR safely in-place:
# Example: install & run Antigravity CLI on Alpine (use >= 1024 MiB RAM for extracting the 238 MB binary)
curl -fsSL https://antigravity.google/cli/install.sh | bash
kernbox-compat ~/.local/bin/agy && ~/.local/bin/agy install
agy --versionRequirements: Node.js >= 24 (for V8 WebAssembly JSPI support).
npm install
npm run prefetch-distros # optional: caches Alpine locally into ./distros-cache
npm run build
npm startOpen http://localhost:3000. When CLOUDRON_OIDC_ISSUER is not set, Kernbox enables Local Dev Mode so you can sign in as different usernames (alice, bob, developer) to test multi-user isolation immediately.
npm run typecheck
npm run build
npm test- Read-Only Root Filesystem: All runtime writes go strictly to
DATA_DIR(/app/data) and/tmp. - Non-Root Container Process:
start.shdrops privileges viagosu cloudron:cloudronbefore launching Node.js. - Per-User Isolation, Scoped Tokens & Encrypted Credentials: Every API route, file operation, secret vault entry, inter-VM mesh route (
*.kernbox.local), port preview, MCP call, and WebSocket upgrade enforces authentication and strict per-user scoping with symlink-aware path traversal checks. API tokens are stored SHA-256 hashed and cannot read/modify secrets or mint new tokens; secrets, Tailscale credentials (tailscale.enc.json), and NetBird credentials/state (netbird.enc.json) are AES-256-GCM encrypted and excluded from clones and.kernbox.tar.gzexports. - CSWSH, CSRF & Preview/Share Sandbox Protection: Strict
Originvalidation on cookie-authenticated mutating HTTP requests and WebSocket upgrades; guest/preview/:id/:port/*and public/share/:token/*responses run in aContent-Security-Policy: sandboxopaque origin (withoutallow-same-origin) with cookies stripped. - SSRF Protection: Guest networking uses an internal loopback Wisp v1 relay (TCP + UDP) protected by a per-process 256-bit secret token, numerically blocking IPv4 & IPv6 private, loopback, metadata (
169.254.169.254), NAT64, 6to4, and Cloudron-internal IP ranges before opening sockets — and applies the same SSRF checks to custom Tailscale/HeadscalecontrolURLand NetBirdmanagementURLendpoints. - Clean Shutdowns: Stopping an instance or receiving
SIGTERM(e.g. before a Cloudron backup) callsvm.sync()followed by guestpoweroffsoext4overlays flush cleanly.
MIT — see LICENSE. Powered by unkernel (MIT AND GPL-2.0-only).


