Skip to main content

Documentation Index

Fetch the complete documentation index at: https://s2.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

s2-lite is designed to run as a single instance, making self-hosting straightforward. Thanks to its SlateDB engine, s2-lite can provide the same durability guarantee as the managed service — every write durable on object storage before acknowledgment. See the README for more on its internals and quickstart for running it via the s2 CLI. Docker images are available. You can also use the Helm chart for deploying to Kubernetes. The SDKs and CLI can connect to s2-lite by overriding the default endpoints. See SDK: Endpoints and CLI: Configuration for details.
Even if you plan to exclusively use the managed service, s2-lite is useful as an S2 emulator for integration tests and CI/CD pipelines. It implements the same API surface, so your tests run against a real S2 instance without needing network access or credentials.

Init file

s2-lite can pre-create basins and streams at startup from a JSON spec file using the same format used by s2 apply.
s2 lite --init-file init.json
Or set the environment variable:
S2LITE_INIT_FILE=init.json s2 lite
The spec is applied with create-or-reconfigure semantics. Resources that already exist are reconfigured to match the spec, and only the fields present in the spec are updated. Example init.json:
{
  "$schema": "https://raw.githubusercontent.com/s2-streamstore/s2/main/cli/schema.json",
  "basins": [
    {
      "name": "my-basin",
      "config": {
        "create_stream_on_append": true
      },
      "streams": [
        { "name": "events" }
      ]
    }
  ]
}
See CLI: Apply for the full spec file format reference.