Skip to content

Core Pillars

Backdit separates two independent roles inside every daemon:

  • Client / Owner (vault/, controller/): Strips, compresses, encrypts, packs, and Reed-Solomon encodes backups; runs Sentinel Merkle audits; executes local-first or 8-of-14 repairs; and publishes two-tier Recovery Capsules.
  • Host / Provider (storage/, network/protocol/host/): Verifies peer identity and Proof-of-Possession, seals incoming shards to the owner’s X25519 key via RFC 9180 HPKE inside locked RAM, answers 64 KiB Merkle audit challenges, and enforces bilateral GiB-hour quotas and garbage collection.
Backdit Single-Binary Homelab FootprintSingle portable Rust binary with embedded Web UI, Direct Local-Path zero-staging backups, 4-lane bandwidth limits, and Prometheus metrics under AGPL-3.0.5. Single-Binary Homelab FootprintRust 1.100.0 · embedded Web UI · redb · AGPL-3.0-onlySINGLE BINARYEmbedded Web UIOne ~37 MiB binary127.0.0.1:9011 Bearer authOne-time #code= loginWindows tray + Docker0 B STAGINGDirect Local-PathStreams straight fromNAS/host disk withoutbrowser upload limitsSimple & Advanced UI modes4-LANE LIMITSToken-Bucket ControlSeparate upload, download,background repair, andSentinel audit bucketsOff-peak & metered modesOBSERVABILITYOps & Automation ReadyGET /healthz livenessGET /metrics/prometheusbackdit put/get/repairAGPL-3.0 · Open Source
Pillar Subsystem Key Primitives & Cadence
1. Vault & Erasure Client crypto, small-file packing & host memory sealing 64 MiB stripes, Zstd level 3, XChaCha20-Poly1305, RS 8+6, SYMPACK2 (<= 256 files), RFC 9180 HPKE in OS-locked, zeroized LockedBuffer (mlock/VirtualLock)
2. P2P Transport Dual-stack QUIC/TCP mesh & NAT traversal libp2p 0.57.1 (QUIC + TCP/Noise/Yamux), Kademlia DHT, AutoNAT, UPnP, DCUtR, signaling-only Circuit Relay v2 (256 KiB / 120s), 64-entry reliable peer cache
3. Bilateral Reciprocity Tokenless per-partner GiB-hour ledgers Zero-sum i128 byte-seconds per partner, temporary 512 MiB / 5% bootstrap pool, 48 sticky partners, 14 distinct accounts with observed network diversity (<= 2 per public /24 or /48 where applicable), [[economy.trusted_accounts]]
4. Sentinel Audits Risk-tiered Proof-of-Storage watchdogs 10m cycle, 64 KiB Merkle proofs (Degraded 30m, New Host 4h, Trusted 12h), +1 pass / -10 bad proof / 0 unreachable timeout, local-only bans
5. Self-Healing & Journals Urgency repair queue & zero-WAN rebuilds 2 checks 30s apart, 60s Critical / 5m Urgent / 30m Watch / 24h Healthy, TABLE_LOCAL_SOURCES 0 B WAN repair before 8-of-14 P2P fallback, 2-phase crash journals
6. Garbage Collection Disk safety & reclaim valves 15m boot delay then 24h loop, 85% -> 70% temporary trial reclaim (>= 30d zero-reciprocity debt), 90% -> 80% stale non-creditor valve (>= 60d inactive); creditors, trusted accounts, and Recovery Capsules never evicted
7. Cold Recovery 24-word BIP-39 clean-machine restore <= 1 MiB Root Index (BKDTCAP1) + 2 MiB RS 8+6 segments (16 deltas -> Base), 2-step sequence/confirming-host check, atomic redb hydration
8. Bandwidth & Transfers 4-lane token buckets & Direct Local-Path Separate upload, download, repair (2 MiB/s), and audit (512 KiB/s) limiters, off-peak schedules, metered bypass for <= 9 shards, hedged 9-request retrieval
9. Storage Engine Embedded ACID DB & atomic shard store redb v5 (Durability::Immediate critical commits, 250ms soft-state flush), postcard BACKDIT1 envelopes (16 MiB cap), NTFS-safe 256-bucket temp -> fsync -> hard_link
10. Control Plane & UI Local REST API, embedded SPA & CLI 127.0.0.1:9011, constant-time 32-byte Bearer auth, #code= launch exchange, Simple/Advanced UI, /healthz, /metrics/prometheus
11. Runtime Foundation Config, worker pools & panic-free guards #![cfg_attr(not(test), deny(clippy::unwrap_used, clippy::expect_used, clippy::panic))], WorkerSet CPU isolation, 6h binary self-check
  • All persisted redb values, recovery capsules, packs, and /backdit/placement-stream/1.0.0 (BKDTNET1) control frames serialize via postcard with explicit pre-decode size bounds and trailing-byte checks.
  • All critical mutations (file manifests, placement journals, bilateral ledgers, recovery hydration) commit via redb Durability::Immediate, while soft telemetry flushes asynchronously without blocking P2P streams.