Skip to main content
Run a local deployment through this loop:
This process creates a durable event log. Applications use replay or follow to build their own derived views. The examples use curl to show the HTTP interface. An SDK or HTTP/1.1 client with Unix-socket support can use the same API.

1. Install the binary

Download an archive and checksum from Groundhog releases. Published archives target Apple Silicon macOS and x86-64 Linux. Each archive contains groundhog, BUILD-INFO, the Groundhog license, and third-party notices. For version 0.2.0:
Use the version pinned by your application or deployment. Groundhog uses Unix domain sockets and does not open a TCP port.

2. Initialize a deployment

Initialization creates:
Initialization writes groundhog.toml last and supports exact retries. The same command validates the deployment without rewriting it. Groundhog refuses conflicting files in paths that it owns. It preserves unrelated sibling files in demo/. See init for detailed retry and conflict behavior.

3. Review the configuration

The generated groundhog.toml is:
Relative paths resolve against the configuration file’s directory. They do not resolve against the process working directory. An empty token disables HTTP authentication. Set a token to require a bearer header on every request.
Protect the configuration file because it stores the token as plaintext. Groundhog 0.2 does not accept a [query] section. Remove that section from a Groundhog 0.1 configuration before the upgrade. See the configuration reference for all fields.

4. Start the service

Run this command in one terminal:
The process reports its socket path on standard error:
This line is not a readiness check. Confirm readiness with a routed request:
An empty log returns:
HTTP/1.1 requires the URL host, but Groundhog ignores its value. Stop the service with Ctrl-C or SIGTERM. Graceful shutdown resolves queued mutations before it releases the writer.

5. Ingest an atomic batch

A successful append returns a durable receipt:
Groundhog validates every event before it writes the atomic batch. It adds event IDs, observation times, content hashes, and event hashes.

Retry safely

The pair (source, batch_id) is the durable idempotency key. Submit identical content with the same ID after a timeout or lost response.
  • Identical content returns status: "duplicate" and the original event range.
  • Different content with the same ID returns HTTP 409 and writes nothing.
Use a stable delivery, webhook, export, or synchronization ID. Do not create a new ID only because a response was lost.

6. Replay durable history

Replay reads committed events directly from the log:
The response contains matching events in increasing event_id order. It also contains next_after and snapshot_through_event_id. Persist next_after for the next finite replay request. Use the same filters and add after=<next_after>. A filtered empty page can still advance next_after across unrelated events. Do not use last_event_id as the finite replay progress cursor.

7. Enumerate streams

GET /v1/streams reads authoritative stream summaries from the same durable log:
Each row contains source, stream, frontier_event_id, and event_count. The result order is source followed by stream. For another page, send next_after as after. Also send the first page’s snapshot_through_event_id as through. The anchor excludes later commits from the same logical enumeration.

8. Follow new commits

Add follow=true to keep the replay response open:
The response uses newline-delimited JSON. It sends initial events records, one caught_up record, and later live events records. An end record identifies a clean or typed terminal condition. EOF without an end record is a transport failure. Persist the last delivered event ID. Reconnect with that ID as the exclusive after cursor.

9. Build a derived view

Groundhog 0.2 does not include local SQL or a warehouse. A consumer builds its own database, index, cache, or analytical model. A durable consumer normally performs these actions:
  1. Read finite replay from its saved after cursor.
  2. Apply each event to the consumer’s derived view.
  3. Save the applied event_id in the same transaction when possible.
  4. Start follow from the saved event ID after it catches up.
  5. Reconnect and resume after any terminal or transport failure.
The consumer owns its derived-view schema and rebuild process. It can reconstruct that state by replaying the Groundhog log again.

10. Verify and seal

Run structural verification while the service remains active:
Run deep chain verification when you need all content commitments:
To seal the append tail into immutable Parquet segments:
Sealing changes physical storage and does not change logical event history.

Upgrade note

Groundhog 0.2 ignores old warehouse.duckdb files and never deletes them. Remove them manually only after the 0.2 deployment opens, verifies, and passes application checks. See Deployment operations for the complete upgrade procedure.

Next steps

  • Read the HTTP API for replay, follow, streams, lifecycle, limits, and errors.
  • Use the Python SDK when an application does not need direct HTTP calls.
  • Read Storage before you design backup and recovery procedures.
  • Use Verification and recovery for incident procedures.