Skip to content

Quickstart

Backdit ships as a single self-contained binary (backdit) with an embedded Web UI (http://127.0.0.1:9011).

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.

Terminal window
# 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 --open

If 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.exe runs silently in the Windows system tray with no console window. Use the tray menu to open the Web UI, open logs, or quit (--background and --no-tray control 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>/data beside the binary. Override with --config-dir or BACKDIT_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-ui or set BACKDIT_DISABLE_WEB_UI=true.
  • SSH tunnel for remote headless servers:
    Terminal window
    ssh -L 9011:127.0.0.1:9011 <user>@<host>
    Then open http://127.0.0.1:9011 and sign in with <config_dir>/api_token (or init_token prior to setup).
  • OS service & autostart:
    Terminal window
    # Linux (systemd) and macOS (launchd):
    backdit service install
    backdit service uninstall
    # Cross-platform login autostart (use this instead of service install on Windows):
    backdit autostart enable|disable|status
    Before enabling autostart with a portable binary, move backdit out of Downloads, Temp, or macOS AppTranslocation.

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:

Terminal window
cd web && npm ci && npm run build && cd ..
cargo build --release --locked

Option C: Docker Compose (NAS / Linux Servers)

Section titled “Option C: Docker Compose (NAS / Linux Servers)”
Terminal window
docker compose up -d
# Retrieve the Web UI / API Bearer token:
docker exec backdit-node cat /data/api_token

To 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:ro

Key docker-compose.yml ports and environment defaults:

  • 9010/tcp and 9010/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 (0 switches 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).

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, bilateral GiB-hour balance, and runway.
  • backdit put <file> (add --direct / -d to bypass HTTP when the daemon is not hosting): Stream a file into 64 MiB encrypted 8+6 stripes and print its File 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-Source zero-WAN repair first, else 8-of-14 P2P).
  • backdit file delete <file_id>: Delete a file and schedule remote shard removal.
Terminal window
# Check status and upload an archive
backdit status
backdit put /mnt/backups/proxmox-vzdump-2026-11-25.tar.zst
# -> prints UUID, e.g. 550e8400-e29b-41d4-a716-446655440000
# Restore or trigger manual repair / delete
backdit get 550e8400-e29b-41d4-a716-446655440000 /mnt/restore/archive.tar.zst
backdit repair 550e8400-e29b-41d4-a716-446655440000
backdit file delete 550e8400-e29b-41d4-a716-446655440000

List stored File IDs from scripts using api_token:

Terminal window
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 bash
set -euo pipefail
PHASE="${1:-}"
if [ "$PHASE" = "backup-end" ] && [ -n "${TARGET:-}" ] && [ -f "$TARGET" ]; then
/usr/local/bin/backdit put "$TARGET" >> /var/log/vzdump-backdit.log 2>&1
fi

ZFS Snapshot + Restic / Borg / Kopia Offsite Push

Section titled “ZFS Snapshot + Restic / Borg / Kopia Offsite Push”
#!/usr/bin/env bash
set -euo pipefail
STAMP=$(date +%F)
ARCHIVE="/mnt/staging/restic-repo-${STAMP}.tar.zst"
tar -I 'zstd -T0 -3' -cf "$ARCHIVE" -C /tank/backups/.zfs/snapshot/daily restic-repo
backdit put "$ARCHIVE" | tee -a /var/log/backdit-backups.log
rm -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 running backdit. Backdit streams straight from disk into 64 MiB stripes (or 64 MiB packs 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-only TABLE_LOCAL_SOURCES for zero-WAN repairs.
  • Restore (POST /api/v1/files/{id}/download-local): Stream decrypted bytes directly to a chosen host folder (protected-root guards return 403 Forbidden if targeting Backdit’s own config, data, or chunks paths). Browser HTTP Range downloads (GET /api/v1/files/{id}/download) are also available in File Details.
  • P2P Port Forwarding (9010/tcp + 9010/udp): Forward both 9010/tcp (Noise/Yamux) and 9010/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-only libp2p Circuit Relay v2 (256 KiB / 120s per circuit) plus DCUtR hole-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 to 127.0.0.1:9011 by default with Bearer token authentication. Never forward or expose port 9011 to 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"): Requires 14 cryptographically distinct host AccountIds per 8+6 stripe (preferring diverse observed connection networks, with at most 2 shards per public IPv4 /24 or IPv6 /48 subnet). Because DEFAULT_BOOTNODES is intentionally empty in v0.1.0 while 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, or config.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, or config.toml:
    [network]
    mode = "friends_only"
    # Set true ONLY if your private circle has fewer than 14 independent machines:
    allow_degraded_backups = true
    bootnodes = [
    "/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].friends peering allowlists. Set max_hosted_gb (GiB) and gc_exempt = true for 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 = 250
    gc_exempt = true
Terminal window
# 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