The provisioner
Source: shared/api-core/src/lib/provisioner.ts.
Not every state machine is equal. Free machines share the main zeq.dev api-core. A paid
spin-up is provisioned as its own isolated Docker container. The provisioner is what does that.
What a paid spin-up gets
- its own Postgres database,
- its own Redis instance,
- its own audit clock (a private per-machine Zeqond ticker),
- its own state explorer at
<slug>.zeqstate.com.
The steps
When provisionMachine(...) runs it:
- generates unique secrets via the same bootstrap logic as the air-gapped
bootstrap.sh; - renders a
docker-compose.ymlfrom the air-gapped template; - starts the container on a dynamically assigned port;
- registers it in the
provisioned_machinesregistry; - updates nginx to route
<slug>.zeqstate.com→ the container port.
getMachineStatus, listProvisionedMachines, stopMachine, and isProvisioned manage the
lifecycle; assertSafeSlug guards the slug before it ever reaches a shell or a compose file.
Why isolation
A paid machine's data, clock, and explorer are its own — nothing is co-tenanted with the shared node. That is what lets the seal spine and the entangled-state chain make per-machine guarantees.