Overview
What nspawn is, what it is not, and how images, machines, the hub and systemd fit together.
nspawn manages systemd-nspawn machines the way docker manages containers: images come from an OCI registry (the hub), are stored as shared layers and are started, inspected and stopped through the D-Bus APIs of systemd-machined and systemd. This documentation describes nspawn 0.2.0.
If you are new, start with the overview and then get started. The command reference lists every command and option.
What nspawn is, what it is not, and how images, machines, the hub and systemd fit together.
Requirements, installation from source, a first machine pulled from the hub and an app from Docker Hub.
Image references, the hub and Docker Hub, search and credentials, what pull does, the storage backends, boot and app detection, more machines from one image, and where everything lives on disk.
Starting and stopping machines, entrypoints, environment and volumes, running commands inside, reading their output, and how boot and app images differ.
The nspawn0 bridge, published ports, DNS and machine names, how apps get their network, firewalls, and the veth and host alternatives.
Building an image with mkosi through nspawn build, and uploading it to the hub or another registry with push.
The configuration file, environment variables and global flags, what wins when they disagree, and what is remembered per machine.
Every command and option of nspawn 0.2.0.
Short answers to the questions that come up most.
Where the code lives, how to build and test it, and how to send changes.