Architecture Guide

How Omarchy runs natively in a browser tab.

No remote desktop stream, no VNC server, and no cloud VM. Every packet of systemd, Hyprland, Quickshell, and Arch Linux ARM runs locally inside your browser tab on a WebAssembly Linux 7 kernel and WebGL2 virtio-gpu.

Browser Tab (Static Site on GitHub Pages) ├─ Service Worker (sw.js) │ ├─ Injects COOP/COEP headers → enables SharedArrayBuffer & 4-vCPU SMP │ └─ Translates HTTP Range reads across ≤45 MiB zstd EROFS chunks ├─ unkernel.wasm (Linux 7.3.4 compiled to WebAssembly) │ ├─ Real Linux MMU, ext4, EROFS (zstd), overlayfs, cgroups, systemd │ └─ kwemu aarch64 JIT running unmodified Arch Linux ARM binaries ├─ virgl.wasm (virglrenderer → WebGL2) │ └─ Hardware-accelerated virtio-gpu 3D scanout (/dev/dri/card0 → ImageBitmap) └─ Arch Linux ARM + Omarchy 4.5 ├─ systemd 261 + udev + VT-less seatd (SEATD_VTBOUND=0) ├─ Hyprland 0.56 (Lua config, GLES 3.0, software cursor, AQ_NO_MODIFIERS=1) └─ Quickshell + Tokyo Night + Foot + Neovim + Starship + Btop

Step 1 Booting a real Linux 7 kernel in WebAssembly

Rather than emulating an x86 PC or faking POSIX syscalls in JavaScript, this runs unkernel: Linux 7.3.4 compiled straight to WebAssembly (unkernel.wasm) with a real software MMU and a multi-CPU SMP patch. Syscalls, page faults, overlayfs, cgroups, and EROFS run at WebAssembly speed, while unmodified aarch64 Linux binaries run on kwemu (an interpreter + WebAssembly JIT across 4 Web Workers).

Step 2 Preparing an Arch Linux ARM base image for unkernel

Unkernel's bundled initramfs looks for a read-only root image labelled kwroot containing /usr/lib/kw-distro, then mounts an overlayfs whose writable upper layer lives on a persistent disk labelled kwdata. Stock Arch Linux ARM doesn't include those markers or unkernel's kwtty vsock daemon, so gpu/build.sh builds arch.ext4 rootlessly under fakeroot with three additions:

  • /usr/lib/kw-distro (omarchy) and /usr/lib/kw-image so overlayfs persists changes to kwdata instead of falling back to RAM tmpfs.
  • kwtty.service running /usr/bin/kwbox tty serve over AF_VSOCK port 1022, enabling host 9p mounts (/mnt/stage) and live vm.exec() diagnostics.
  • An hvc0 serial autologin drop-in so the browser's slide-up Console drawer drops straight into a diagnostic shell.

Step 3 Installing Omarchy 4.5 inside the guest under Node

gpu/install.mjs boots arch.ext4 + an 8 GiB sparse omarchy.img (kwdata) under Node with direct host networking and runs gpu/guest/setup.sh cleanly over vm.spawn():

  • Removes the unused bare-metal linux-aarch64 kernel and 1.3 GiB of linux-firmware-* packages before updating.
  • Adds DisableSandbox to /etc/pacman.conf (pacman 7's Landlock sandbox isn't present in the Wasm kernel) and points /etc/pacman.d/mirrorlist at Omarchy's matched aarch64 stable snapshot (arm-stable-mirror.omarchy.org) alongside pkgs.omarchy.org/stable/aarch64 so Hyprland and Aquamarine sonames match exactly.
  • Installs extra/mesa explicitly first so opengl-driver gets Mesa's virgl driver instead of Apple Silicon's mesa-aurora.
  • Installs real omarchy, omarchy-settings, hyprland, quickshell, seatd, foot, neovim, btop, fastfetch, lazygit, starship, and core utilities, keeping all Omarchy themes (with intro videos removed and one background image per theme, shrinking themes from 171 MB to 33 MB).

Step 4 Making Hyprland & Quickshell run without VTs or bare-metal DRM

Getting a real Wayland compositor to render inside a browser's WebGL2 canvas required solving five subtle Linux graphics details:

  • VT-less seat management: unkernel.wasm has no CONFIG_VT (/dev/tty0 does not exist). Running seatd -g video with SEATD_VTBOUND=0 creates a clean non-VT seat0 so Aquamarine acquires /dev/dri/card0 and /dev/input/event*.
  • Real systemd user session: Omarchy's uwsm-app launcher and PipeWire require user@.service and a D-Bus session bus. Enabling linger and starting user@UID.service before Hyprland makes Super+Return and desktop portals work.
  • Software cursors & modifier-less DRM: Unkernel's virtio-gpu acknowledges hardware cursor queues as no-ops, so Hyprland runs with cursor.no_hardware_cursors = 1 and AQ_NO_MODIFIERS=1, compositing the pointer directly onto the 3D scanout.
  • Zero-cost animations & Quickshell rendering: Because systemd-detect-virt returns none inside unkernel, Omarchy's no-animations.lua and window-opaque.lua toggles are applied unconditionally, and Quickshell renders crisp Wayland SHM layers via QT_QUICK_BACKEND=software straight into Hyprland's hardware WebGL2 virgl compositor.
  • Log permissions: Logs go to /var/log/omarchy-desktop.log rather than sticky /tmp (where Linux's fs.protected_regular blocks root from reopening user-owned files).

Step 5 Shipping a multi-gigabyte desktop on static GitHub Pages

GitHub Pages caps individual files at 100 MB, sites at 1 GB, and does not allow custom COOP/COEP HTTP headers needed for SharedArrayBuffer. To run 100% statically with zero external storage:

  • Compressed EROFS image: gpu/pack-pages.mjs flattens the installed rootfs into a single read-only zstd-compressed EROFS image (mkfs.erofs -zzstd,9 -L kwroot) that the Wasm kernel mounts and decompresses on the fly.
  • 45 MiB static chunks + Range stitching: The EROFS file is split into <45 MiB static files under distros/chunks/ with a JSON manifest. The Service Worker (sw.js) intercepts Range requests for distros/omarchy.erofs, fetches only the exact overlapping byte slices needed for each disk block, and injects COOP: same-origin + COEP: require-corp on every response.
  • Persistent browser storage: User changes made inside the running Omarchy desktop are written to unkernel's built-in kwdata overlay stored locally in your browser's IndexedDB.

Ready to try it locally in your browser?

Open Omarchy Launcher