clone

a self-hosted sync node for lofi apps: jazz sync over iroh, ticket-gated, with no static ip or cloud needed

main
lofi-node / docs / site / storage-choices.md
storage-choices.md 1.8K rendered
1# Storage choices23<!-- Source: FelineStateMachine/lofi-node docs/hosting-lofi-apps.md ("Storage choice") and4 src/config.ts (StorageConfig). -->56The node's store is where your synced data durably lives, and the choice is deliberately narrow7because the underlying engine's honest surface is narrow: jazz-napi supports exactly a SQLite8directory or memory today. The `storage.type` discriminator in `config.json` is the seam future9providers slot into.1011## SQLite on a path you choose1213```sh14lofi-node init --storage-path /mnt/nas/lofi15```1617```jsonc18// config.json19"storage": { "type": "sqlite", "path": "/mnt/nas/lofi" }20```2122The path can be any mounted location — a NAS volume, a synced directory, an external disk. It is23probed writable at boot; an unwritable location fails fast by name instead of silently degrading.24Omitting the path keeps the store inside the data directory (`<dataDir>/jazz`).2526## Memory2728```sh29lofi-node init --memory30```3132Everything is ephemeral — useful for tests, demos, and throwaway topologies. A restart is a fresh,33schema-less store: enrolled apps will classify it `no_schema` again and prompt for34[provisioning](provision-a-store.md).3536## Off-site durability3738For cloud-grade durability without a cloud sync service, replicate the SQLite file: a39Litestream-style continuous replica to S3-compatible storage, or snapshots of the volume the path40lives on. [Pairing a second node](pair-two-homes.md) is the other half of the story — replication at41the Jazz layer rather than the file layer — and the two compose.4243One honest caveat: back up the **data directory** alongside the store. `config.json` holds the44node's secrets and app id, and `tickets.json` holds the digests that make issued tickets valid; a45restored store without them is reachable by nobody.