A Linux runtime, without the daemon
Runs nothing unless it is sealed, trusted and allowed.
A capsule is a plain directory: a manifest, a root filesystem and a signature over both. The host checks all three before anything starts, then confines the program in a kernel sandbox.
Version 0.16.0 · source available (FSL) · one static binary
$ capsule run vault
capsule: refusing to run: has 0 of 2 required approvals
# alice and bob each sign their approval
$ capsule run vault
opened
$ echo x >> vault/rootfs/etc/motd
$ capsule run vault
capsule: refusing to run: rootfs was changed after sealing
The messages are capsule's own. Pick a situation above.
What it leaves out
If nothing is running, nothing of capsule is running. Everything it keeps is a file you can read.
capsule run is the parent process of the program it starts. Kill it and the capsule is gone.What it does
From one program on one host to a fleet that places and heals itself, with the same three checks in front of every start.
Conditions sealed in
Approvals from named signers, time windows, time locks, host lists and run counts are part of what is signed. Nobody can relax them afterwards.
A record that cannot be quietly edited
Every run and every refusal goes into the host's own signed, chained log. Other hosts can witness it.
Private networking by name
Capsules reach each other over WireGuard tunnels, only on ports both manifests declare. Key exchange is hybrid post-quantum, with ML-KEM-1024.
Orders in place of SSH
Operators sign a fixed set of instructions. Hosts fetch, check and obey them on a timer, and answer with sealed receipts.
Orchestration without a scheduler
One signed document says what should run. Every host works out the same placement from a public random beacon and takes over by lease.
Without root
Capsules run in a user namespace. A small helper adds what only root can do, to members of one group, as far as the operator allows.
Try to get one past it
A capsule and a host, here in the page. Seal the capsule, then change a file, loosen its limits, sign it with another key, or run it short of an approval. The checks run in capsule's order and the messages are capsule's own.
The capsule
A directory: a manifest, a root filesystem, and a seal over both.
The host
The hashing is real (SHA-256, in your browser). Signatures are stood in for by the name of the key, and an approval by a button; in capsule each is an Ed25519 and an ML-DSA-87 signature over the seal.
Try it before you install it
Three parts of capsule run in your browser as they are, not as pictures of themselves.
capsule dashboard serves, on telemetry recorded from ten capsules with faults injected.
Key levelsPick a level, break a kind of mathematics, and see which signatures and keys still hold.
capsule's own cipherThe network in whole numbers, computed here and checked against the Go code's answers.
The sandbox costs nothing you can measure
With the latency profile a program gets dedicated cores, locked memory, huge pages and its own network card. Worst-case delay over 120 seconds, on a bare-metal Xeon E3-1245 v5 with every other core kept busy:
| Where the program ran | Busy polling | Wake-up |
|---|---|---|
| Directly on the host, isolated core | 23 µs | 20 µs |
| In a capsule, latency profile | 20 µs | 14 µs |
| On the host, shared core | 11,686 µs | 1,930 µs |
| In a capsule, shared cores | 8,001 µs | 2,376 µs |
Bars are on a logarithmic scale: each step to the right is ten times longer. On a linear scale the first two would be invisible.
Measured with oslat and cyclictest; test/bench-latency.sh repeats it on your hardware. DPDK also runs in a capsule, with the kernel out of the network path. One machine and one network card so far, and nothing yet measured across a wire: the release notes list every limit.
Where it runs
Every test suite passes on each of these before a release, as root and without root. Alpine, which has no systemd, runs capsules as root with fewer features.
sudo apt-get install -y uidmap wireguard-tools cryptsetup-bin e2fsprogs nftables curlEvery suite passes, as root and without root, on x86-64; 25.04 also on arm64.
x86-64, and arm64 on Ubuntu. Kernel 5.11 or newer with cgroup v2. What each distribution needs.
Five minutes to a running capsule
Download the archive for your machine from the latest release, then:
# install tar xzf capsule-0.16.0-linux-amd64.tar.gz && cd capsule-0.16.0-linux-amd64 sudo sh dist/install.sh capsule # a signing key: hosts run only what a key they trust has sealed capsule keygen dev sudo cp dev.pub /etc/capsule/trust.d/ # a capsule, from any root filesystem curl -LO https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-minirootfs-3.20.3-x86_64.tar.gz capsule init -rootfs alpine-minirootfs-3.20.3-x86_64.tar.gz hello # seal it, and run it capsule seal -key dev.key hello sudo capsule run hello
Go further
The wiki is the short way in. The guide walks from the first run to a fleet.