capsule

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.

A capsule moves through three checks, sealed, trusted and allowed, and then runs in a kernel sandbox. A second capsule, with one byte changed, is stopped at the first check: refusing to run, rootfs was changed after sealing.

What it leaves out

If nothing is running, nothing of capsule is running. Everything it keeps is a file you can read.

daemoncapsule run is the parent process of the program it starts. Kill it and the capsule is gone.
imagesNo layers and no image format. A capsule is a directory you can open, diff and copy.
registryReleases live wherever you already keep files: a folder, a bucket, Vault or Artifactory.

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.

Three hosts run the capsules web, api and db, joined by tunnels, and read the same public random beacon. Host b stops answering and its lease lapses; host c takes the lease and runs api. No scheduler, no control plane, no leader.
A host that stops renewing its lease loses its capsules to the next host of the same draw. With a hot standby and detection set to 100 ms, the change was measured at 99 to 118 ms on the arm64 test machine.
The key of an encrypted capsule sits behind four walls: X25519, ML-KEM-1024, a shared secret and Classic McEliece. A quantum computer breaks the first; if lattices fell too, the last two would still hold and the key would stay wrapped.
An encrypted capsule's key is wrapped for each host that may open it. Levels 7 and 9 add walls that do not rest on the same mathematics as the standard ones. capsule's own cipher is new and has been attacked by nobody but its author, which is why it is only ever a second layer.

Why capsule, and not the usual way

Most ways to run software on Linux have one of two shapes: an engine that pulls and runs images, or a cluster with a control plane. capsule is neither. The same questions, asked of all three:

QuestionAn engine that runs imagesA cluster with a control planecapsule
What is running when nothing is running?Often a daemon, as root. Where there is none, there are still images and a registry.A control plane: an API server, a store, a scheduler, and an agent on every machine.Nothing. capsule run is the parent of the program and ends with it.
What decides that a program may start?Whoever can reach the engine. Signatures are optional and checked by separate tools.Access rules in the control plane, and admission add-ons you install and keep working.The host itself: a valid seal, a signer it trusts, and the conditions sealed inside. The check is the only way in.
Where do the rules for a release live?Outside it: in pipelines and in habits.Outside it: in policies that someone can change later.Inside what is signed: approvals by named people, time windows, host lists, run counts. Nobody can relax them afterwards.
What is a release?Layers in an image format, pulled by name from a registry.The same images, with documents that describe how to run them.A directory you can open, diff and copy, kept wherever you already keep files.
Who places work across machines?Nobody; you add an orchestrator.A scheduler and a leader, which must stay up and be defended.Every host, by itself: all work out the same placement from one signed file and a public random beacon, and take over by lease.
What do you have to operate?The engine, a registry, and signing tools if you want them.A cluster: its upgrades, its certificates and its store.One static binary and plain files.
What stands against a quantum computer?Classical signatures, where releases are signed at all.Classical certificates between its parts.Hybrid everywhere: Ed25519 with ML-DSA-87, X25519 with ML-KEM-1024, and more walls at higher key levels.

When something else fits better. If you need a large catalogue of ready-made images, hosts that are not Linux, a managed service from a cloud, or software that many companies have audited, use what you have. capsule is young, written by one author, and has not had an independent security audit. It fits where you would rather prove what runs than trust that it is right: regulated workloads, releases that need two signatures, and hosts that must keep working when nothing central can be reached.

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.

    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 ranBusy pollingWake-up
    Directly on the host, isolated core23 µs20 µs
    In a capsule, latency profile20 µs14 µs
    On the host, shared core11,686 µs1,930 µs
    In a capsule, shared cores8,001 µs2,376 µs

    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 curl

    Every 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

    One line installs the latest release: it picks the build for the machine, checks it against the release's SHA-256 list, installs the packages capsule's features use, and sets it up. Run it again to upgrade.

    # install, or upgrade
    curl -fsSL https://runcapsule.io/install.sh | sudo sh
    
    # 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

    Rather look first? Read the installer: it is short. Or take the archive from the latest release and run sudo sh dist/install.sh capsule yourself. To remove capsule and keep your settings and data: curl -fsSL https://runcapsule.io/install.sh | sudo sh -s -- remove. On Alpine, use wget -qO- in place of curl -fsSL, as root.

    Questions people ask

    Short answers. The design reference has the long ones.

    What is capsule?

    capsule is a runtime for Linux that starts a program only after three checks: it is sealed (nothing changed since it was signed), trusted (signed by a key this host trusts) and allowed (the conditions sealed inside it hold). A capsule is a plain directory with a manifest, a root filesystem and a signature. There is no daemon, no image format and no registry.

    Is capsule a container runtime?

    It confines programs with the same kernel features containers use: its own process, mount, network, IPC and hostname namespaces, a read-only root filesystem, no capabilities, a system call allow list and cgroup limits. What differs is everything around that: nothing runs in the background, a release is a signed directory and not an image, and a host refuses whatever is not sealed, trusted and allowed.

    How is it different from an engine that runs images, or from a cluster orchestrator?

    An engine that runs images will start whatever it is handed, and signing is an extra. A cluster orchestrator needs a control plane that must stay up and be secured. capsule has neither: the check is in the only path to starting a program, the rules are part of what is signed, and hosts place and take over work from one signed file and a public random beacon, with no scheduler and no leader.

    How do I install capsule?

    One line on the Linux host: curl -fsSL https://runcapsule.io/install.sh | sudo sh. It downloads the latest release for the machine, checks it against the release's SHA-256 list, installs the packages capsule's features use and sets up the program. Run it again to upgrade.

    Which Linux distributions does it run on?

    Every test suite is run on Ubuntu 22.04, 24.04 and 26.04, Debian 12, Rocky Linux 9, Fedora 43, openSUSE Leap 15.6 and Alpine 3.23. Releases are built for x86-64 and arm64. It needs Linux 5.11 or newer with cgroup v2.

    Does capsule need root?

    No. Capsules run in a user namespace. A small helper adds what only root can do, such as fast tunnels, sized volumes and ports below 1024, to members of one group and as far as the operator allows. On Alpine, which has no systemd, capsules run as root only.

    Can I use the software I already package as images?

    capsule does not read image formats or pull from registries. A capsule is built from any root filesystem as a tar archive or a directory, for example a distribution's minimal root filesystem with your program added, and can be declared in CUE.

    Is capsule ready for post-quantum cryptography?

    Yes. Everything is hybrid, a classical scheme together with a post-quantum one, so an attacker must break both: Ed25519 with ML-DSA-87 for signatures and X25519 with ML-KEM-1024 for wrapping keys and for tunnels. Higher key levels add SLH-DSA, a shared secret and Classic McEliece.

    Is capsule open source?

    It is source available under the Functional Source License: free to use, change and run, but not to resell as a competing product. Each version becomes Apache 2.0 two years after its release.

    Has capsule been audited?

    No. capsule is young and written by one author, and it has not had an independent security audit. Its tests run on eight Linux distributions before every release, and its own cipher, which is only ever a second layer over AES-256-GCM, has an open challenge for anyone to break.

    Go further

    The wiki is the short way in. The guide walks from the first run to a fleet.