Skip to content

Architecture ​

The Atlas app owns regional decisions. Metal owns execution on each host. The network services carry VM traffic.

New to desired and observed state? Read how a VM request works first.

Build the system from the bottom up ​

Flow diagram
Loading diagram...

Metal runs VMs on physical hosts. WG Mesh gives each VM a stable private address and carries packets across hosts. Atlas decides which VMs and services to create. It is not in the packet path.

A privileged VM is a tenant-0 VM that can reach other tenants through WG Mesh. The proxy and Cargo use that access.

A gateway VM is a privileged VM with an extra network role. It can receive traffic for an external prefix and forward client packets through the mesh. The IPv6 router uses that role.

Regional services build on these blocks. The HTTP proxy accepts application requests. The IPv6 router forwards client packets. How VMs reach each other explains the network rules. Service VMs explains how Atlas creates these services.

Who owns what ​

ComponentOwns
Atlas appProvider hosts, VM host selection and lifecycle requests, images, addresses, service setup, DNS, and certificates.
MetalHost VM records, capacity, Firecracker processes, ZFS disks, local images, networking, and migration execution.
HTTP proxySite and domain route maps, replication, and public HTTP forwarding.
WG MeshPrivate IPv6 forwarding, tenant isolation, and VM location discovery.
IPv6 routerTranslation between a public IPv6 block and regional mesh addresses.

Atlas creates Cargo, proxy, and router VMs through the same VM service used for tenant requests.

External systems: Central and Cargo have implementations outside this repository. Atlas accepts Central service tokens and installs Cargo on a service VM. The Cargo guide describes the integration present here.

Where state lives ​

StateStored inAfter a crash
Regional requests and assignmentsAtlas DocTypes in MariaDBAtlas jobs resume from committed records. Redis supports jobs and temporary data.
Host VM requests and progressMetal config.json and status.jsonMetal resumes unfinished work. Invalid records stop manager startup.
Guest disks and local artifactsZFS and Metal filesMetal resumes storage work. Object storage holds source image artifacts.
Private networkingHost links, WireGuard, and WG Mesh mapsHost sync restores policy. Metal restores VM links. WG Mesh learns locations again.
Public route mapsEach proxy node's snapshot and generationThe proxy cluster elects a leader and repairs stale nodes.

Atlas's Virtual Machine State is a cache of the last host report. VM lists and image-use checks read it. Use Metal for current host state.

How the parts talk ​

PathProtocol or purposeDetails
Client → AtlasHTTPS with an issuer-bound EdDSA tokenTenant API
Atlas → MetalMutual TLS for control and host syncMetal daemon and API
Browser → realtime bridge → MetalConsole token, then a mutual-TLS WebSocketConsole access
Metal → MetalCoordination API and separate TLS disk streamMigration
Central or Atlas → proxyRoute changes through the control APIHTTP proxy
Public client → guestOpenResty, host routes, or IPv6 translationTraffic paths

Atlas calls provider and DNS APIs for hosts and public records. Atlas and Metal use object storage for image artifacts. The security model explains the credentials.

AGPL-3.0