Documentation
Halden
A sync and storage engine for local-first applications.
Halden is a single-binary engine that keeps application data in sync across clients and stores it durably on disk. It exposes one HTTP interface for reads, writes, and a live change stream — no external database, no background services to coordinate.
Data is organized into namespaces. Each namespace is an independent keyspace with its own change log, so unrelated apps can share one engine without stepping on each other.
#Installation
Halden ships as one static binary. Place it on your host and start it:
# download and start $ curl -sSL get.vless.barrakyda.biz/install | sh $ halden serve --data /var/lib/halden → listening on :4600 · api ready · sync ready
#Quickstart
# create a namespace $ halden ns create notes # write a record $ curl -X PUT :4600/v1/notes/today \ -d '{"body":"hello"}' # read it back $ curl :4600/v1/notes/today {"body":"hello","rev":1}
#Configuration
Configure with flags, environment variables, or a small YAML file. Flags take precedence.
# halden.yaml
data: /var/lib/halden
listen: 127.0.0.1:4600
log: info
retention:
snapshots: 24data— directory for the append-only log and snapshots.listen— address the HTTP interface binds to.retention.snapshots— how many point-in-time snapshots to keep.
#API reference
Every route lives under /v1/<namespace>. Requests without a valid token return 401.
| Method & path | Description |
|---|---|
GET /v1/{ns}/{key} | Read a single record. |
PUT /v1/{ns}/{key} | Create or replace a record. |
DELETE /v1/{ns}/{key} | Remove a record. |
GET /v1/{ns}/_watch | Server-sent stream of changes in the namespace. |
GET /health | Liveness probe. Returns 200 when the engine is ready. |
#CLI
The halden binary is both the server and the client.
| Command | Description |
|---|---|
halden serve | Start the engine. |
halden ns create <name> | Create a namespace. |
halden ns ls | List namespaces. |
halden status | Show engine health and namespace stats. |