Deploy checklist
- Provision Postgres (Postgres in production).
- Set
store.backendand thedatabase.*settings inswarm.yaml, supplying the password viadatabase.password_env(Configuration). - Prepare the artifact root (Runtime storage).
- Pin
platform_versioninpackage.yaml(Contract versioning). - Start the runtime —
swarm serve --contracts ./my-flow --store postgres— remembering that production needs a deliberately bound public address (the default is loopback-only). - Check
/readyzreports ready.
Topology
Swarm runs as a single Go binary. Local and development runs use SQLite by default; production uses Postgres (opt-in via--store postgres). Dynamic per-entity and privileged workspaces are
created as containers by runtime policy.
Today the scope is a single deployment: distributed execution and multi-tenant isolation are
not yet in scope.
Postgres in production
In production, Postgres holds everything. Every event lands in the event store, every entity field change lands in the mutation log, and runs correlate it all byrun_id. Because the
mutation log is a complete record, current entity state can always be rebuilt from it —
disaster recovery is replaying the log. Size Postgres for your event and mutation volume, and back it up like
the system of record it is.
Configuration
Connection, credentials, runtime mode, and ports are set throughswarm.yaml keys and flags; see
Configuration. The binary serves on 127.0.0.1:8081.
Runtime storage
artifact_repo_commit writes to a runtime-private root (SWARM_ARTIFACT_ROOT, default
/var/lib/swarm/artifacts). It must be writable, persistent across restarts, and outside
every agent-visible mount. Agents only ever see opaque swarm-artifact:// URLs.
Contract versioning
A product declares aplatform_version range in package.yaml; boot rejects a bundle whose
range excludes the running platform. Because replay and fork depend on contracts, roll a new
bundle deliberately, and use the persistence layer to reconstruct
or fork past runs — forks currently run against the same bundle as the source run.
Maintenance and reset
Pause ingress for a maintenance window withswarm control pause --all, and resume with
swarm control continue --all.

