Getting started

Server deployment

The server holds the replica, the branches, and the engine processes. The CLI talks to it over an authenticated HTTP API.

Run the server

# generate an admin token and start the server
$ export SNAPSHOTDB_TOKEN=$(openssl rand -hex 32)
$ snapshotdb serve --bind 127.0.0.1:8080 --db-bind 0.0.0.0 --public-host branches.internal
One server, one token. snapshotdb has no accounts or tenancy. Anyone with the token is an admin. Keep it in a secret store and put the server behind your own network boundary or TLS terminator.

Point clients at it

export SNAPSHOTDB_SERVER=https://snapshotdb.example.com
export SNAPSHOTDB_TOKEN='…'

Every command becomes an authenticated server job. The CLI submits it, waits, and prints the result; --detach returns a job id immediately and snapshotdb job <id> reconnects. A dropped client connection does not cancel the work — a long initial copy keeps running server-side, and status monitors it.

Connect the browser console

Serve the API over HTTPS, then set the exact console origins on the server before starting it:

export SNAPSHOTDB_CONSOLE_ORIGINS=https://snapshotdb.io,https://www.snapshotdb.io

In Console → Connection, enter your HTTPS API address and server token. Cross-origin access is disabled unless explicitly allowed. For local development, allow http://localhost:3000.

Reboots

Restart snapshotdb serve to restore branch proxies and restart synced roots. Use the systemd deployment unit to start it automatically after reboot.