Enterprise Setup

Run ChunkHound across a fleet from one internal object store. Each machine reads its configuration from the store at the start of every run, and buffers usage events locally for upload when analytics is enabled.

A single machine does not need this setup.

Envelope schema, analytics fields, and precedence: Configuration.

How the parts connect

One bucket in the middle: config down, analytics up
ChunkHound runs as a fleet of instances against one IT-owned object store. Each instance fetches its configuration envelope from the config prefix at the start of every run, applies the envelope's rules to its global config, and keeps running on the saved config when the fetch fails. Analytics is opt-in: each command appends one event to a local buffer, and the client uploads batches to the analytics prefix. The instances never coordinate with each other. The organization's own ETL pipeline reads the analytics prefix into its warehouse.
Your warehouse your own analytics stack
Standard ETL pipeline Loads usage analytics into your warehouse.
IT-owned bucket the only shared component
Remote config config/<repo>/<ring>/envelope.json
Usage analytics analytics/<repo>/<identity>/YYYY/MM/DD/*
ChunkHound fleet thousands, no coordination between them
Reads its envelope On every start, before work begins.
Pushes usage events Buffered locally, shipped in batches.

Config is fetched before every run and never cached; a failed fetch falls back to the config on disk.

The only stateful component is the object store, and it is the only thing the fleet shares. Each machine reads centralized configuration from the store before every run and writes usage analytics back to it, so no machine needs to know about any other. Adding machines adds clients, not ChunkHound services: only the store must scale with the fleet.

What the store must provide

Config lives at any HTTPS URL you choose, so its key layout is yours. The config/ in the examples is a convention.

Analytics keys are fixed; Usage Analytics shows the key and how the endpoint places it.

Fetch the configuration

remote_config.url is any HTTPS URL that returns the envelope JSON. The client sends a GET with one optional Authorization header, taken from remote_config.auth_header.

Set both in the global config file or with CHUNKHOUND_REMOTE_CONFIG__URL and CHUNKHOUND_REMOTE_CONFIG__AUTH_HEADER; file discovery, precedence, and backups: Configuration.

Pull directly

When the store serves the envelope readably, the URL is the whole configuration:

{
  "remote_config": {
    "url": "https://objects.corp.internal/chunkhound/config/<repo>/prod/envelope.json"
  }
}

Leave auth_header unset: some stores reject an unexpected Authorization header.

Pull through a proxy

The proxy holds the store credentials and reads the envelope with its own identity, so it can sign requests or present a client certificate when the store requires it. It validates the bearer token and maps it to a repo and a ring:

{
  "remote_config": {
    "url": "https://config.corp.internal/chunkhound/envelope.json",
    "auth_header": "Bearer ${CHUNKHOUND_CONFIG_TOKEN}"
  }
}

Redirects stay on the same origin: the client drops Authorization on a cross-origin redirect. The proxy access log is your pull audit.

Open-source proxies for this:

  • Envoy: token checks and store request signing in one process.
  • Caddy with caddy-security: JWT and PASETO checks plus ACLs; add aws-sigv4-proxy when the store needs SigV4.
  • oauth2-proxy behind Traefik or Nginx: JWT bearer checks; add a signer for the store.

The token-to-ring map lives in the proxy config or a small service.

Envelope rollout model

An envelope is a JSON list of changes that each machine applies at startup. Keep it in Git, validate it in CI, and publish it at the ring’s pull URL.

{
  "version": 1,
  "min_chunkhound_version": "5.3.0",
  "rules": [
    { "id": "embedding.provider", "op": "set", "value": "openai" }
  ]
}
  • Each rule changes one setting. Rules run in order, and the last rule at a path wins.
  • An envelope changes only the settings it names. To undo a setting, publish a rule that sets the old value or removes it.
  • A bad rule is skipped and the rest still apply. If the result would break the config, the client discards the envelope.
  • min_chunkhound_version keeps a new envelope off an old binary.
  • when.os and when.existing are the only client-side selectors; use separate URLs or tokens for groups.
  • Values are written to the global config in plaintext, so keep secrets in the environment.

Schema, rule ids, predicates, and the delta gate: Envelope format, Rules.

Analytics

Analytics is off by default. When enabled, each command appends to a local buffer, and a flush uploads one application/x-ndjson object. Key layout, the buffer cap, and the upload failure model: Usage Analytics.

  • Credentials are static: the environment pair or the analytics.* keys. There is no STS token, role discovery, or refresh.
  • Set anonymize to hashed or anonymous before rollout; full records the OS username.

Operational constraints

Every command fetches remote config at startup. Size the store and the endpoint for the whole fleet and keep them reachable; the fetch budget and failure model live in Fetch behavior.

Envelopes are not signed, so TLS and review in Git are the integrity boundary.

Fleet targeting is limited to URLs, tokens, when.os, and when.existing. There is no push channel or dashboard.

To verify a rollout, run chunkhound index --simulate --verbose, then stop the endpoint and confirm a command still runs from the last saved config. Fetch and upload failure behavior: Fetch behavior, Analytics failure behavior.

Where to next