Kernbox: personal Linux playgrounds on Cloudron, powered by a WebAssembly kernel
-
Hi everyone,
I built a small community app I want to share: Kernbox.
It started with Guillermo Rauch's post about unkernel by Pooya Parsa, a real Linux 7.x kernel compiled to a single WebAssembly module. My first thought was whether this could run as a proper Cloudron app. Cloudron apps have a read-only rootfs, run unprivileged and have no
/dev/kvm, so spinning up a fresh Alpine or Debian to try something was never really an option. unkernel needs no host privileges, so it fits.What Kernbox does:
- Every Cloudron user logs in via OIDC and gets their own isolated Linux instances (Alpine, 1 to 4 vCPUs, about 200 ms boot with 2 vCPUs).
- The VMs run server side in Node.js 24, the browser only shows an xterm.js terminal. Close the tab, reopen on another device, and the shell is still there with its scrollback.
- Each instance stores a sparse ext4 overlay plus a
/workfolder under/app/data, so everything is part of the normal Cloudron backups. Instances can be cloned or reset. - An encrypted secret vault per user (AES-256-GCM). Secrets reach the VM only in RAM, as env vars and under
/run/kernbox/secrets. - Outbound traffic goes through an internal relay that blocks loopback, private ranges, cloud metadata and the Cloudron Docker networks. Web servers inside a VM can be opened through a sandboxed preview port.
Install via the versions URL in the dashboard (App Store, Custom / Community App):
https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.jsonor with the CLI:
cloudron install --versions-url https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.json --location kernbox.yourdomain.tldTested on Cloudron 10. It's MIT licensed. There's a short showcase video in the repo under
docs/showcase.mp4, and I wrote up the background, including a fun "Illegal instruction" detour, on my blog: https://tzel.ch/en/kernbox-linux-playgrounds-on-cloudron/Feedback, issues and PRs are very welcome. I'm especially curious how it runs on other setups.
-
Quick update: I've pushed a few releases since the initial post, now at v0.8.0. Here's what's new:
- Mobile PWA (iOS & Android): Installable to the home screen with a Termius-style extra-keys bar (
ESC,TAB, stickyCTRL/ALT, arrows,^C, copy/paste helpers, quick snippets) andvisualViewportkeyboard handling. - Always-on, auto-boot & startup commands: Per-instance toggles to disable idle auto-stop, automatically boot an instance after a Cloudron/app restart, and run an optional startup command (e.g.
sh /work/boot.shor an isolated:hostGitea Actions runner) inside a dedicatedStartupterminal tab with retained scrollback. - Instance export & import (
.kernbox.tar.gz) : Export any instance (sparse OS overlay +/work+ settings, secrets intentionally excluded) as a compact archive and import it on another account or Cloudron server. - Public preview share links (
/share/<token>/) : Optionally publish a guest loopback HTTP port with a revocable, time-limited public URL — still isolated withCSP: sandbox(noallow-same-origin) and cookie stripping. - REST API,
/exec, OpenAPI 3.1 & built-in MCP server (/mcp) : Scoped Personal Access Tokens (read,exec,full, stored SHA-256 hashed, unable to read/modify secrets or mint tokens), a synchronousPOST /api/instances/:id/execendpoint (handy for n8n, scripts, or iOS Shortcuts),/api/openapi.json, and a built-in Streamable HTTP MCP endpoint at/mcpfor AI agents.
Existing installations on Cloudron 10 can update straight from the dashboard via the same
CloudronVersions.jsonURL. As always, feedback and bug reports are very welcome! - Mobile PWA (iOS & Android): Installable to the home screen with a Termius-style extra-keys bar (
-
Hi everyone,
I built a small community app I want to share: Kernbox.
It started with Guillermo Rauch's post about unkernel by Pooya Parsa, a real Linux 7.x kernel compiled to a single WebAssembly module. My first thought was whether this could run as a proper Cloudron app. Cloudron apps have a read-only rootfs, run unprivileged and have no
/dev/kvm, so spinning up a fresh Alpine or Debian to try something was never really an option. unkernel needs no host privileges, so it fits.What Kernbox does:
- Every Cloudron user logs in via OIDC and gets their own isolated Linux instances (Alpine, 1 to 4 vCPUs, about 200 ms boot with 2 vCPUs).
- The VMs run server side in Node.js 24, the browser only shows an xterm.js terminal. Close the tab, reopen on another device, and the shell is still there with its scrollback.
- Each instance stores a sparse ext4 overlay plus a
/workfolder under/app/data, so everything is part of the normal Cloudron backups. Instances can be cloned or reset. - An encrypted secret vault per user (AES-256-GCM). Secrets reach the VM only in RAM, as env vars and under
/run/kernbox/secrets. - Outbound traffic goes through an internal relay that blocks loopback, private ranges, cloud metadata and the Cloudron Docker networks. Web servers inside a VM can be opened through a sandboxed preview port.
Install via the versions URL in the dashboard (App Store, Custom / Community App):
https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.jsonor with the CLI:
cloudron install --versions-url https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.json --location kernbox.yourdomain.tldTested on Cloudron 10. It's MIT licensed. There's a short showcase video in the repo under
docs/showcase.mp4, and I wrote up the background, including a fun "Illegal instruction" detour, on my blog: https://tzel.ch/en/kernbox-linux-playgrounds-on-cloudron/Feedback, issues and PRs are very welcome. I'm especially curious how it runs on other setups.
@pathab wow, well done, looks interesting, I look forward ro playing with it.
-
Loving Kernbox, but there's one gap that's costing real time.
When you create a box you choose a name, e.g. devbox.
The actual instance ID becomes devbox-1a2b3c4d.
The app only ever shows devbox, but every API call and MCP tool requires the full ID. So there's no way to use the API until you've guessed the suffix wrong at least once and read the error.Two small fixes would close this:
- respect the user's name of the box w/o adding a suffix
- set the suffix (good reasons for it) but show it to the user in the left sidebar.
It's visible in /app/data/users/<user>/instances, but who wants to go digging for info that should be visible in the UI
Good work, thank for releasing the community app.
-
FYI : I tested a use case for Kernbox by installing
picoclawlilghtweight agent running as Go binary with a cloud LLM. Actually runs quite nicely.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login