Install¶
shard-db is a single static C binary. You can build from source in seconds, or grab a pre-built release tarball.
Platform requirements¶
- Linux x86_64 or ARM64. Uses
epoll,mmap, POSIX pthreads. - gcc 9+ (or clang 10+).
- No other runtime dependencies — xxhash is bundled header-only; only
libcandlibpthreadare linked.
Not portable to macOS or Windows without source changes.
Option 1 — build from source¶
Output lives under build/:
build/
bin/
shard-db # daemon binary
shard-cli # ncurses TUI client
db.env.example # template config — copy to db.env on first deploy
build/bin/ is the only artefact. $DB_ROOT (from your db.env) is created lazily on first ./shard-db start; an existing data directory is never touched, so dropping a fresh build/ tree onto an upgraded host is non-destructive.
Manual compile¶
Useful when you want a custom install prefix or a non-default optimization level. Flags like -DNDEBUG, -march=native, or -flto are safe to add.
Option 2 — pre-built release¶
Download the tarball for your platform from the GitHub releases page:
Each release archive contains the stripped binary, default db.env, and the helper scripts.
First run sanity check¶
cd build/bin
./shard-db start # starts the daemon on the port in db.env (default 9199)
./shard-db status # confirms it's running
./shard-db stop # graceful shutdown
If status reports the server as running but connections hang, check:
db.envis present in the current working directory (see Configuration).- The port in
db.envisn't already in use (ss -tlnp | grep 9199). - Logs under
./logs/(or whereverLOG_DIRpoints) — errors are inerror-YYYY-MM-DD.log.
Next¶
- Quick start — insert and query your first record in five minutes.
- Configuration — db.env, tokens, allowed IPs, tenant directories.