A microVM for every app

Deploy a microVM on your own Linux host in a single command. Each app boots in Firecracker with its own Linux kernel and gets a private network by default.

runs as
your user
host
Linux 6.17+
license
Apache-2.0
~/web
# cairn.toml
version = 1
app = "web"
image = "docker.io/library/nginx:1.27"
[[services]]
internal_port = 80
  [[services.ports]]
  port = 8080

            
Lifecycle

$ cairn deploy

Build and boot a release

$ cairn status web

Show status, endpoints, and log paths

$ cairn stop web

Shut down and keep the disk

$ cairn destroy web

Remove the app and its machines

Features

The isolation of a VM, the workflow of a container

Start with a container image you already use. Describe the app in cairn.toml and cairn builds the disk, sets up networking, and boots the VM.

01

Bring your own kernel

cairn fetches a pinned guest kernel on first deploy. Set kernel_file to use your own build.

02

A private network by default

Each private subnet comes with NAT and DNS. Publish ports to the host, connect apps on a shared network, or limit outbound traffic by hostname.

03

Keep your data across deploys

Store databases, uploads, and other app data on volumes that survive redeploys and restarts.

04

Recover from a failed deploy

cairn waits for the new release to be ready and can roll back a failed deploy. By default, it leaves the app stopped if the new release may have changed a volume.

05

Run under your own account

Firecracker runs as your regular user and uses your cgroup limits. Two small helpers handle privileged setup.

06

Isolate your coding agent

Use cairn run to launch a coding agent in a microVM with a synced copy of your project.

07

Open a shell in a running VM

Run commands or open a shell with cairn exec. Attach to the serial console with cairn console.

08

Restart after a crash

cairn restarts workloads on failure by default. Enable systemd user lingering to bring apps back after a host reboot.

09

Check your host in one command

Run cairn doctor to check KVM access, kernel support, group membership, and the installed helpers.

How cairn deploys your app

Each release boots in a fresh microVM. Across redeploys, the app keeps its configured network, published ports, and persistent volumes.

cairn.toml and an image go through cairn deploy into the app "web", whose current release points at a Firecracker machine. The app joins network "web", which publishes host 127.0.0.1:8080 to guest port 80, and mounts volume "data". cairn.toml + image cairn deploy APP "web" current release previous release machine 7K2… Firecracker microVM own kernel cairn-init your workload joins mounts network "web" subnet · NAT · DNS egress allowlist volume "data" survives redeploys host 127.0.0.1:8080 → guest port 80

cairn run

Run coding agents in microVMs

cairn run starts Claude Code by default. To run another agent, pass its container image or configure an alias. The agent works on a copy of your project, with file changes synced both ways by default.

$ cairn run
your folder ~/src/project
  • src/
  • app.tschanged
  • util.ts
  • Makefile
  • package.json
  • README.md
Review changes locally
⇄ sync
microVM · jailed project copy
  • src/
  • app.tsedited
  • util.ts
  • Makefile
  • package.json
  • README.md
Coding agent running

Security

A separate kernel, a jailed runtime

Guest kernel
Workloads make system calls to a separate Linux kernel inside the microVM.
Firecracker jail
Firecracker runs in a restricted filesystem (a chroot) with three device nodes and keeps its seccomp filter.
Privileged helpers
cairn-jail sets up the jail, and cairn-helper configures host networking. Access is limited to root and members of the cairn group.
Fixed paths
Both helpers ignore environment variables and use executable paths fixed at build time.

Install cairn on Linux

Requires an x86-64 host with Linux 6.17 or later and KVM.

Fedora
sudo curl -fsSLo /etc/yum.repos.d/cairn.repo https://packages.cairn.dev/cairn.repo
sudo dnf install cairn
sudo usermod -aG cairn $USER
Ubuntu
sudo curl -fsSLo /etc/apt/keyrings/cairn-packages.gpg https://packages.cairn.dev/cairn-packages.gpg
sudo curl -fsSLo /etc/apt/sources.list.d/cairn.sources https://packages.cairn.dev/cairn.sources
sudo apt update && sudo apt install cairn
sudo usermod -aG cairn,kvm $USER

Deploy your first microVM

Follow a working example, then use the same steps to deploy your own app.