Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Community Packages
  3. Kernbox: personal Linux playgrounds on Cloudron, powered by a WebAssembly kernel

Kernbox: personal Linux playgrounds on Cloudron, powered by a WebAssembly kernel

Scheduled Pinned Locked Moved Community Packages
5 Posts 2 Posters 104 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    P
    pathab
    App Dev
    wrote last edited by
    #1

    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 /work folder 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.json
    

    or with the CLI:

    cloudron install --versions-url https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.json --location kernbox.yourdomain.tld
    

    Tested 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.

    timconsidineT 1 Reply Last reply
    2
    • P
      P
      pathab
      App Dev
      wrote last edited by
      #2

      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, sticky CTRL/ALT, arrows, ^C, copy/paste helpers, quick snippets) and visualViewport keyboard 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.sh or an isolated :host Gitea Actions runner) inside a dedicated Startup terminal 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 with CSP: sandbox (no allow-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 synchronous POST /api/instances/:id/exec endpoint (handy for n8n, scripts, or iOS Shortcuts), /api/openapi.json, and a built-in Streamable HTTP MCP endpoint at /mcp for AI agents.

      Existing installations on Cloudron 10 can update straight from the dashboard via the same CloudronVersions.json URL. As always, feedback and bug reports are very welcome!

      1 Reply Last reply
      1
      • P pathab

        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 /work folder 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.json
        

        or with the CLI:

        cloudron install --versions-url https://raw.githubusercontent.com/patattzel/kernbox/main/CloudronVersions.json --location kernbox.yourdomain.tld
        

        Tested 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.

        timconsidineT
        timconsidineT
        timconsidine
        App Dev CA Maintainer Super Fan
        wrote last edited by
        #3

        @pathab wow, well done, looks interesting, I look forward ro playing with it.

        Indie app dev, scratching my itches : communityapps.appx.uk, portfolio at myca.appx.uk

        1 Reply Last reply
        0
        • timconsidineT
          timconsidineT
          timconsidine
          App Dev CA Maintainer Super Fan
          wrote last edited by timconsidine
          #4

          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.

          Indie app dev, scratching my itches : communityapps.appx.uk, portfolio at myca.appx.uk

          1 Reply Last reply
          0
          • timconsidineT
            timconsidineT
            timconsidine
            App Dev CA Maintainer Super Fan
            wrote last edited by
            #5

            FYI : I tested a use case for Kernbox by installing picoclaw lilghtweight agent running as Go binary with a cloud LLM. Actually runs quite nicely.

            Indie app dev, scratching my itches : communityapps.appx.uk, portfolio at myca.appx.uk

            1 Reply Last reply
            0

            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
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search