Architecture Overview
Volt is built on Linux-native primitives rather than custom daemons. Containers use systemd-nspawn, VMs use KVM, storage uses content-addressed hashing, and everything is managed through systemd. No Docker daemon. No containerd. No shims.
Platform Components
┌──────────────────────────────────────────────────────────────────┐
│ volt CLI │
│ (single Go binary) │
└──────────────┬──────────────┬──────────────┬────────────────────┘
│ │ │
┌─────────▼──────┐ ┌────▼────────┐ ┌───▼──────────┐
│ Voltainer │ │ Voltvisor │ │ Stellarium │
│ (containers) │ │ (VMs) │ │ (CAS) │
├────────────────┤ ├─────────────┤ ├──────────────┤
│ systemd-nspawn │ │ KVM/QEMU │ │ SHA256 store │
│ machinectl │ │ Stardust │ │ dedup blobs │
│ nsenter │ │ cloud-init │ │ refs/manifst │
└───────┬────────┘ └──────┬──────┘ └──────┬───────┘
│ │ │
┌───────▼─────────────────▼───────────────▼───────┐
│ systemd │
│ units · targets · journald · cgroups · timers │
└───────────────────────┬─────────────────────────┘
│
┌───────────────────────▼─────────────────────────┐
│ Linux Kernel │
│ namespaces · cgroups v2 · KVM · nftables │
│ Landlock · seccomp · capabilities │
└─────────────────────────────────────────────────┘
The volt CLI is a single statically-compiled Go binary that orchestrates three subsystems: Voltainer for containers, Voltvisor for virtual machines, and Stellarium for content-addressed storage. All three are unified under the Workload abstraction.
Voltainer — Container Runtime
Voltainer runs containers using systemd-nspawn, the container runtime built into systemd. No daemon process — containers are first-class systemd services.
How It Works
- Image → Rootfs:
volt image pullusesdebootstrapto create clean root filesystems, orvolt image importto import existing tarballs. - Create:
volt container createcopies the image rootfs into/var/lib/volt/containers/<name>/and generates a.nspawnconfig + systemd unit file. - Start:
volt container startactivates the systemd unit, which launchessystemd-nspawnwith the configured isolation. - Exec:
volt container execusesnsenterto enter the running container's namespaces. - Logs: All output goes to
journald— unified with system logs, queryable withjournalctl.
Backend Architecture
Volt uses a pluggable backend interface (ContainerBackend) with two implementations:
| Backend | Use Case | Dependencies |
|---|---|---|
| systemd | Production — full isolation | systemd-nspawn, machinectl, nsenter |
| proot | Rootless / testing | proot (no root required) |
Backends register via init() functions, making the system extensible.
Container Lifecycle
image pull container create container start
│ │ │
▼ ▼ ▼
┌──────────┐ ┌────────────────┐ ┌────────────────┐
│ Download │ │ Copy rootfs │ │ systemctl │
│ rootfs │────▶│ Generate unit │─────▶│ start unit │
│ (deboot) │ │ Write .nspawn │ │ (nspawn runs) │
└──────────┘ └────────────────┘ └───────┬────────┘
│
┌──────────────────────┤
│ │
▼ ▼
container exec container stop
│ │
▼ ▼
┌──────────┐ ┌────────────┐
│ nsenter │ │ systemctl │
│ into ns │ │ stop unit │
└──────────┘ └────────────┘
Voltvisor — Virtual Machine Management
Voltvisor manages KVM-based virtual machines through the same volt CLI. VMs get the same lifecycle commands as containers but with hardware-level isolation.
Capabilities
- Create:
volt vm creategenerates a VM directory withconfig.yamland a systemd unit - SSH:
volt vm sshresolves the VM's IP and connects - Storage:
volt vm attachlinks storage to VMs via symlinks - Desktop:
volt desktopprovides full VDI with ODE profiles (terminal, office, creative, gaming)
VM File Structure
Stellarium — Content-Addressed Storage
Stellarium is Volt's content-addressed storage (CAS) system. Every blob is stored by its SHA256 hash, providing automatic deduplication and integrity verification.
How CAS Works
# Build a directory into CAS
sudo volt cas build /path/to/app
# Check CAS status
sudo volt cas status
# Verify integrity of all objects
sudo volt cas verify
# Garbage collect unreferenced objects
sudo volt cas gc --dry-run
sudo volt cas gc
Storage Layout
The two-level directory structure prevents filesystem limitations (ext4's ~64K files per directory limit) while keeping lookups fast.
If three containers share the same nginx binary, CAS stores it once. Each container's filesystem uses hard-links pointing to the same blob. Zero wasted space.
Bundles
Volt can package CAS objects into portable .vbundle files — ZIP archives containing manifests and blobs with SHA256 verification:
sudo volt bundle create myapp-v1.vbundle --ref myapp-v1
sudo volt bundle inspect myapp-v1.vbundle
sudo volt bundle import myapp-v1.vbundle
sudo volt bundle verify myapp-v1.vbundle
Unified Workload Abstraction
The Workload layer abstracts across containers, VMs, and services. A single command can list, start, stop, or inspect any workload type:
# List all workloads (containers + VMs + services)
sudo volt ps
# Inspect any workload
sudo volt ps inspect myapp
# Freeze/thaw (containers: cgroup freezer; VMs: SIGSTOP/SIGCONT)
sudo volt workload freeze myapp
sudo volt workload thaw myapp
| Workload Type | Backend | Isolation |
|---|---|---|
| Voltainer (container) | systemd-nspawn | Namespaces, cgroups, capabilities |
| Voltvisor (VM) | KVM / QEMU | Hardware virtualization |
| Service | systemd unit | Service sandboxing |
Constellations — Multi-Service Stacks
Constellations are Volt's compose system. Define multi-container stacks in a volt-compose.yaml file and manage them as a unit:
version: "1"
services:
web:
image: debian-minimal
command: nginx -g "daemon off;"
ports:
- "80:80"
volumes:
- webdata:/var/www
depends_on:
- db
db:
image: debian-minimal
command: postgres
volumes:
- pgdata:/var/lib/postgresql
volumes:
webdata:
pgdata:
# Deploy the stack
sudo volt compose up
# Check services
sudo volt compose ps
# View logs
sudo volt compose logs
# Tear down
sudo volt compose down
Under the hood, Constellations create a systemd target with individual service units, bridge networks, and volumes.
File Layout
State Management
Volt stores state in simple files — no database required:
| State | Format | Location |
|---|---|---|
| Workload state | JSON | /var/lib/volt/workload-state.json |
| Volume metadata | JSON | Per-volume in /var/lib/volt/volumes/ |
| Firewall rules | JSON | /etc/volt/firewall-rules.json |
| Network policies | JSON | /etc/volt/network-policies.json |
| License | YAML | /etc/volt/license/license.yaml |
| Platform config | YAML | /etc/volt/config.yaml |
All JSON writes use atomic operations (write to temp file, then rename) to prevent corruption.