Quickstart
Backdit ships as a single self-contained binary (backdit) with an embedded Web UI (http://127.0.0.1:9011).
1. Install, Build & Launch
Section titled “1. Install, Build & Launch”Option A: Prebuilt Binary (Windows, Linux, macOS)
Section titled “Option A: Prebuilt Binary (Windows, Linux, macOS)”Download the release archive for your platform from GitHub Releases and verify its checksum against SHA256SUMS.
# 1. Interactive first-time setup (generates your 24-word BIP-39 recovery phrase)backdit init
# 2. Start the daemon and open the embedded Web UI (http://127.0.0.1:9011)backdit daemon --openIf you skip backdit init, launching backdit daemon --open (or double-clicking backdit.exe on Windows) starts the first-run setup wizard in your browser using a one-time #code= launch code that exchanges into an in-memory session with zero manual token copy-paste.
- Windows silent tray launch: Double-clicking
backdit.exeruns silently in the Windows system tray with no console window. Use the tray menu to open the Web UI, open logs, or quit (--backgroundand--no-traycontrol headless/tray behavior). - Portable Mode: When placed in a writable directory outside system install paths (and outside containers), Backdit automatically stores
<exe_dir>/config,<exe_dir>/logs, and<exe_dir>/databeside the binary. Override with--config-dirorBACKDIT_CONFIG_DIR. - Open Web UI anytime: Run
backdit web(or double-click the Windows tray icon). - API-only headless mode: Run
backdit daemon --no-web-uior setBACKDIT_DISABLE_WEB_UI=true. - SSH tunnel for remote headless servers:
Then open
Terminal window ssh -L 9011:127.0.0.1:9011 <user>@<host>http://127.0.0.1:9011and sign in with<config_dir>/api_token(orinit_tokenprior to setup). - OS service & autostart:
Before enabling autostart with a portable binary, move
Terminal window # Linux (systemd) and macOS (launchd):backdit service installbackdit service uninstall# Cross-platform login autostart (use this instead of service install on Windows):backdit autostart enable|disable|statusbackditout ofDownloads,Temp, or macOSAppTranslocation.
Option B: Build from Source
Section titled “Option B: Build from Source”Requires Node.js 24+ and Rust 1.100.0 (rust-toolchain.toml). Always build web/dist before compiling Rust so the binary embeds the SPA:
cd web && npm ci && npm run build && cd ..cargo build --release --lockedOption C: Docker Compose (NAS / Linux Servers)
Section titled “Option C: Docker Compose (NAS / Linux Servers)”docker compose up -d# Retrieve the Web UI / API Bearer token:docker exec backdit-node cat /data/api_tokenTo enable zero-staging Direct Local-Path backups inside Docker, mount your backup archive directory read-only in docker-compose.yml:
volumes: - ./backdit-data:/data - /mnt/backups:/sources:roKey docker-compose.yml ports and environment defaults:
9010/tcpand9010/udp: P2P Noise/Yamux and QUIC transport.127.0.0.1:9011:9011/tcp: Local REST API and embedded Web UI bound strictly to host loopback.BACKDIT_OFFERED_STORAGE_GB="50": Offered storage quota in GiB (0switches to pure routing/bootstrap mode).BACKDIT_AUTO_INIT="1": Generates a 24-word phrase on first boot (capture it from logs or/data/recovery_words.txt).
2. Two Backup & Restore Workflows
Section titled “2. Two Backup & Restore Workflows”Workflow 1: CLI Automation (cron, systemd, vzdump, Restic/Borg/Kopia)
Section titled “Workflow 1: CLI Automation (cron, systemd, vzdump, Restic/Borg/Kopia)”Verified CLI subcommands:
backdit status: Inspect daemon health, peer count, NAT reachability, bilateralGiB-hourbalance, and runway.backdit put <file>(add--direct/-dto bypass HTTP when the daemon is not hosting): Stream a file into64 MiBencrypted8+6stripes and print itsFile ID(UUID).backdit get <file_id> <output>: Download, verify, and reconstruct a file to<output>.backdit repair <file_id>: Inspect stripe health and repair degraded shards (Local-Sourcezero-WAN repair first, else8-of-14P2P).backdit file delete <file_id>: Delete a file and schedule remote shard removal.
# Check status and upload an archivebackdit statusbackdit put /mnt/backups/proxmox-vzdump-2026-11-25.tar.zst# -> prints UUID, e.g. 550e8400-e29b-41d4-a716-446655440000
# Restore or trigger manual repair / deletebackdit get 550e8400-e29b-41d4-a716-446655440000 /mnt/restore/archive.tar.zstbackdit repair 550e8400-e29b-41d4-a716-446655440000backdit file delete 550e8400-e29b-41d4-a716-446655440000List stored File IDs from scripts using api_token:
TOKEN=$(cat ~/.backdit/api_token)curl -sS -H "Authorization: Bearer $TOKEN" http://127.0.0.1:9011/api/v1/files \ | jq '.files[] | {id, name, size_bytes, health_status}'Proxmox VE vzdump Hook (/usr/local/bin/vzdump-backdit-hook.sh)
Section titled “Proxmox VE vzdump Hook (/usr/local/bin/vzdump-backdit-hook.sh)”Set script: /usr/local/bin/vzdump-backdit-hook.sh in /etc/vzdump.conf:
#!/usr/bin/env bashset -euo pipefailPHASE="${1:-}"if [ "$PHASE" = "backup-end" ] && [ -n "${TARGET:-}" ] && [ -f "$TARGET" ]; then /usr/local/bin/backdit put "$TARGET" >> /var/log/vzdump-backdit.log 2>&1fiZFS Snapshot + Restic / Borg / Kopia Offsite Push
Section titled “ZFS Snapshot + Restic / Borg / Kopia Offsite Push”#!/usr/bin/env bashset -euo pipefailSTAMP=$(date +%F)ARCHIVE="/mnt/staging/restic-repo-${STAMP}.tar.zst"
tar -I 'zstd -T0 -3' -cf "$ARCHIVE" -C /tank/backups/.zfs/snapshot/daily restic-repobackdit put "$ARCHIVE" | tee -a /var/log/backdit-backups.logrm -f "$ARCHIVE"Workflow 2: Web UI Direct Local-Path Backup & Restore
Section titled “Workflow 2: Web UI Direct Local-Path Backup & Restore”Backdit intentionally removes browser drag-and-drop staging uploads for multi-GB backups:
- Backup (
POST /api/v1/files/upload-local): Pick a file or directory on the host runningbackdit. Backdit streams straight from disk into64 MiBstripes (or64 MiBpacks for small files) using 0 B of extra staging disk, runs in the background if you close the tab, and records the path in local-onlyTABLE_LOCAL_SOURCESfor zero-WAN repairs. - Restore (
POST /api/v1/files/{id}/download-local): Stream decrypted bytes directly to a chosen host folder (protected-root guards return403 Forbiddenif targeting Backdit’s own config, data, or chunks paths). Browser HTTPRangedownloads (GET /api/v1/files/{id}/download) are also available in File Details.
3. Networking, Ports & NAT Traversal
Section titled “3. Networking, Ports & NAT Traversal”- P2P Port Forwarding (
9010/tcp+9010/udp): Forward both9010/tcp(Noise/Yamux) and9010/udp(QUIC) on your router or host firewall for direct inbound reachability. Direct reachability improves peer discovery, hosting reliability, and transfer throughput for NAS and homelab nodes. - UPnP, AutoNAT & Circuit Relay v2: Backdit attempts automatic UPnP port mapping where supported, probes external reachability with
AutoNAT, and falls back to signaling-onlylibp2pCircuit Relay v2 (256 KiB/120sper circuit) plusDCUtRhole-punching when behind NAT or CGNAT. - Loopback-Only Web UI & API (
127.0.0.1:9011): The local REST API and embedded Web UI bind strictly to127.0.0.1:9011by default with Bearer token authentication. Never forward or expose port9011to the public internet; use an SSH tunnel (ssh -L 9011:127.0.0.1:9011 <user>@<host>) for remote headless servers.
4. Joining an Open Mesh vs. Private friends_only Circle
Section titled “4. Joining an Open Mesh vs. Private friends_only Circle”- Open Mesh Testing (
mode = "open"): Requires14cryptographically distinct hostAccountIds per8+6stripe (preferring diverse observed connection networks, with at most2shards per public IPv4/24or IPv6/48subnet). BecauseDEFAULT_BOOTNODESis intentionally empty inv0.1.0while public infrastructure is brought online (official public bootnode multiaddrs will be published once live), pass bootnode multiaddrs via--bootnodes,BACKDIT_BOOTNODES, the Web UI Setup Wizard, orconfig.toml([network].bootnodes). - Private NAS Circle (
mode = "friends_only"): Restricts connections, shard placement, and restores strictly to PeerIDs listed in[network].friends. Pass your friend’s listening multiaddr via--bootnodes,BACKDIT_BOOTNODES, the Setup Wizard, orconfig.toml:[network]mode = "friends_only"# Set true ONLY if your private circle has fewer than 14 independent machines:allow_degraded_backups = truebootnodes = ["/dns/friend-a.example.com/tcp/9010/p2p/<FRIEND_A_PEER_ID>","/dns/friend-a.example.com/udp/9010/quic-v1/p2p/<FRIEND_A_PEER_ID>",]friends = ["<PEER_A_ID>","<PEER_B_ID>","<PEER_C_ID>",] - Optional asymmetric quotas (
[[economy.trusted_accounts]]): Kept strictly separate from[network].friendspeering allowlists. Setmax_hosted_gb(GiB) andgc_exempt = truefor trusted family, friends, or a second NAS so they are exempt from Tier 2 GC eviction even with negative net credit:[[economy.trusted_accounts]]account_id = "<64_HEX_CHAR_ACCOUNT_ID>"label = "Family NAS"max_hosted_gb = 250gc_exempt = true
5. Health & Prometheus Endpoints
Section titled “5. Health & Prometheus Endpoints”# Unauthenticated liveness probe (zero secrets)curl -s http://127.0.0.1:9011/healthz
# Prometheus metrics (Bearer-authenticated by default; opt in to unauth loopback via BACKDIT_PUBLIC_PROMETHEUS=true)TOKEN=$(cat ~/.backdit/api_token)curl -s -H "Authorization: Bearer $TOKEN" http://127.0.0.1:9011/metrics/prometheus