On-disk data lives in folders called homes. This page is a plain-English walk through one home: what a run is, how a write becomes durable, how a read finds a key, and why deletes wait for a merge.
Last reviewed 27 November 2026 against the laststore disk format and the Explore design notes for homes and the commit log.
One LastStore folder. Four named parts for the sealed set.
A home is a directory. Inside it you will find a small descriptor that identifies the home, a LOCK file so only one process writes at a time, CURRENT (the official list of live data files), and a runs/ folder for those files.
LastDB uses one home for records and another for record files (attachments). The diagram below is one home; both homes share this shape.
One file of records, written once.
A run is one file of records sorted by key. It is written once and never changed. Each record is a key plus a value, or a key plus a delete marker.
The file is split into blocks. Each block is compressed with zstd when that makes it smaller, then encrypted with AES-256-GCM using a key derived from the home’s key.
Everything is encrypted at rest, block by block. A reader that does not hold the home key cannot read the records.
Log first. Seal later.
On the record home, a write appends a complete commit to an encrypted commit log and flushes it. That commit is durable and readable right away. A later seal freezes those logged commits into a new run, makes the run durable, and only then publishes it by atomically swapping in a new CURRENT.
A reader always sees whole commits. Reads consult the logged commits first, then the sealed runs named by CURRENT.
A crash cannot leave a half-published run in the live set. On restart, run files that CURRENT does not name are deleted. Durable log frames above the sealed frontier are replayed.
Log first, then runs newest to oldest.
After the logged commits, lookups walk sealed runs newest to oldest. A bloom filter skips runs that definitely do not hold the key.
A hit in a run reads one index block and one data block.
If the newest version is a delete marker, the record is gone.
A marker now. Reclaim later.
Runs are never edited in place, so removing one record would mean rewriting a whole file. Instead a delete saves a small marker that hides the old value from later reads.
When these markers are estimated to hide enough logical data, background work seals them into a run. A later base merge removes obsolete data. Readers can delay removal of old files.
Eight into one. Space first.
Eight runs of a level merge into one, keeping only the newest version of each key.
Base compaction becomes eligible when obsolete data exceeds both 64 KiB and one eighth of the logical bytes in the runs. Those bytes are counted before compression.
Merges reserve disk space before writing. If space is insufficient, they preserve the previous saved state and leave the work for later.
Disk format reference: laststore README. Commit-log and dual-home detail is in the Explore guide.
The installer script, the same steps by hand, the database on its own, and how to confirm it is running.
Brain for notes and decisions, LastSecrets for credentials, and MCP for agents.
The health check, the status command, and when a restart is the right step.