NanoTDB

June 4, 2026 · View on GitHub

NanoTDB mascot

One binary. Local files. Built-in dashboard, editor, Explore, and offline CLI.

NanoTDB is a single-binary time-series database with a browser dashboard, a drag-and-edit dashboard editor, an ad-hoc Explore view, and an offline CLI — all in one program. Drop it on a Raspberry Pi, edge box, appliance, or any machine where standing up a TSDB plus a dashboard service plus a collector stack is heavier than the problem you're solving.

You get metric ingest, range queries, rollups, retention, recovery, a dashboard you can edit in the browser, and nanocli to inspect or export data offline — without assembling anything else.


What makes it different

Most "small" TSDBs hand you the storage and tell you to wire up your own UI, collector, and operations. NanoTDB ships them together and keeps them honest:

  • Built-in dashboard AND editor. Edit groups, widgets, and series in the browser. Validate, preview, save. No separate Grafana, no second service to run, no JSON file you have to edit by hand (though you can — it's just dashboard.json).
  • Offline nanocli. Inspect WAL, catalog, manifest, .dat files, export to line protocol, recompute rollups, run aggregate queries — all directly against the data directory, with the server stopped or running.
  • Files you can read. Append-only .dat pages, a single reusable WAL per database, a JSON catalog, a TOML manifest. Retention is partition-file deletion. There is no opaque storage layer between you and your data.
  • Recoverable after crash or power loss. Recent samples are WAL-protected and replayed on restart. Tunable from segment fsync to per-append always. Important on SD-backed edge boxes.
  • Built-in rollups. Long-horizon downsampling lives in the same engine — define [rollups] in a manifest and you get min/max/avg/sum/count series in a destination database, with offline backfill and cascading rollups.
  • SD-friendly footprint. Append-only, partitioned, S2-compressed. A real Raspberry Pi workload runs ~700k samples/day in under 1 MB on disk (see below).
  • Optional drip collector. CPU, memory, disk, IO, network, load, one-wire temperature, and SD-write-probe metrics, ready to POST into NanoTDB.

See it

NanoTDB dashboard showing CPU and memory widgets
Mobile-friendly dashboard — live operational view from one local NanoTDB.
NanoTDB wide desktop dashboard layout
Wide desktop layout for denser placement.
NanoTDB Explore view with metric picker and live chart
Explore — ad-hoc metric picker, last-value cards, live chart.
NanoTDB dashboard editor
In-browser editor — groups, widgets, series, preview, validate, save.

60-second Hello World

Terminal 1:

mkdir -p ~/nanotdb-data
./nanotdb --init --config ~/nanotdb-data/engine.toml
./nanotdb --config ~/nanotdb-data/engine.toml

Terminal 2:

curl -X POST "http://localhost:8428/api/v1/import" \
  -d $'demo/room.temp 21.5\ndemo/room.humidity 48'

curl "http://localhost:8428/api/v1/query?query=demo/room.temp"

./nanocli inspect wal --root ~/nanotdb-data --db demo --verbose

Then open http://localhost:8428/ for the dashboard, /explore for ad-hoc charts, /dashboard/edit for the editor.

For the longer version see docs/HELLO_WORLD.md or docs/GETTING_STARTED.md.


Real footprint on a Raspberry Pi

Actual live data from one Pi running NanoTDB + drip with a handful of DS18B20 temperature sensors, ~12 consecutive days, 10-second cadence:

DayMetricsPointsMetric file size
2026-05-2283693,091757 KB
2026-05-2383717,036935 KB
2026-05-2483722,348996 KB
2026-05-2583725,9861,015 KB
2026-05-2683716,709982 KB
2026-05-2783716,708897 KB
2026-05-2891773,136968 KB
2026-05-2991785,971831 KB
2026-05-3091784,799982 KB
2026-05-3191779,780885 KB
2026-06-0191784,533925 KB
2026-06-0291785,882907 KB

Roughly ~1 MB/day per 700k–785k samples across 83–91 metrics on this real workload. That's under 1.3 bytes per point on disk after compression. A typical Pi SD card holds years of this with room to spare — exactly what the storage layout is tuned for.


Best fit

Good fitUse something larger
Single-binary observability on one machineDistributed or horizontally scaled deployments
Raspberry Pi, edge nodes, appliances, local app metricsLarge fleets, high-cardinality multi-tenant workloads
Hundreds of metrics you want local and inspectableEcosystems where broad integrations matter more than simplicity
Built-in dashboard plus offline CLI workflowSystems that need looser ordering guarantees

NanoTDB is not trying to be a distributed TSDB, a high-cardinality fleet backend, or a system that accepts arbitrary out-of-order writes. It will tell you that plainly — including in this README.


Concepts in 60 seconds

A database is an isolated namespace (prod, sensors, weather) with its own WAL, catalog, manifest, and partitioned .dat files. A metric is one numeric time-ordered stream inside a database; type (int32 or float32) is fixed on first write. A sample is one (timestamp, value) pair, written in line protocol:

DB/metric.name value [timestamp_ns]

Examples:

prod/room.temp 21.5 1715000000000000000
sensors/pressure.hpa 1013
weather/outdoor.humidity 48

For a friendly walkthrough — what a database is, how multiple metrics live inside one DB, what happens when a partition seals, when metric-*.dat files appear, and how to tune the WAL for resilience vs SD wear — see docs/CONCEPTS.md. For the canonical reference, see docs/GLOSSARY.md and docs/ARCHITECTURE.md.


Documentation

Start here

Use the UI

Reference

Concepts


Install

Prebuilt binaries are on GitHub Releases:

  • Raspberry Pi 0/1: nanotdb-linux-armv6-rpi0-rpi1, nanocli-linux-armv6-rpi0-rpi1
  • Raspberry Pi 2/3/4 (32-bit): nanotdb-linux-armv7-rpi3-rpi4, nanocli-linux-armv7-rpi3-rpi4
  • Raspberry Pi (64-bit): nanotdb-linux-arm64, nanocli-linux-arm64
  • Linux x86_64, macOS Intel/Apple Silicon, Windows x64/ARM64 also available

Or build from source:

go build -o nanotdb ./cmd/nanotdb
go build -o nanocli ./cmd/nanocli
go build -o drip    ./cmd/drip   # optional collector

Full install matrix in docs/GETTING_STARTED.md.


Release history

Contributing

See CONTRIBUTING.md for the branch model and release workflow.

License

See LICENSE.