Skip to content

strata serve

strata serve

Serve the web UI, the HTTP API and an MCP endpoint over the index

Synopsis

Serve the web UI at /, the JSON API under /v1 (spec at /openapi.json) and an MCP server at /mcp from one process, which is the only one that opens the index for writing.

With --reindex-every it crawls the configured registries in the background: once at startup, then on that schedule, so the index stays current without webhooks. The UI is usable while the first crawl of a large registry runs: it answers from what is indexed so far, shows the crawl's progress, and lineage, staleness and the views refresh every --refresh-every until the crawl finishes. CLI commands find a running server and route through it instead of opening the locked index file.

Bound to loopback, the server needs no auth. On any other address it is shared mode, and refuses to start without --auth-header: the name of a header a trusted auth proxy sets (such as X-Forwarded-User). The lineage graph maps your attack surface, so it is never served unauthenticated beyond localhost. The API is read-only.

strata serve [flags]

Examples

  strata serve
  strata serve --reindex-every 6h
  strata serve --reindex-every 6h --refresh-every 5m
  strata serve --addr :8080 --auth-header X-Forwarded-User

Options

      --addr string              listen address (default: 127.0.0.1:7878)
      --auth-header string       header a trusted auth proxy sets on every request; required off loopback
  -h, --help                     help for serve
      --refresh-every duration   while a crawl runs, refresh lineage, staleness and the views this often (0 waits for the crawl to finish) (default 10m0s)
      --reindex-every duration   crawl the configured registries at startup and then this often, such as 6h (0 disables)

Options inherited from parent commands

      --config string      config file (default: $XDG_CONFIG_HOME/strata/strata.yaml, ~/.strata.yaml or ./strata.yaml)
      --db string          index file (default: $XDG_DATA_HOME/strata/strata.duckdb)
      --log-level string   log level: debug, info, warn or error (default: info)
      --platform string    platform to pick when a ref names a multi-platform index (default: linux/amd64)
      --server string      URL of a running strata serve to query instead of the index file

SEE ALSO

  • strata - Turn a container registry into a queryable lineage graph