!!!warning Pre-1.0 Setup is opinionated: credentials live in environment variables only, and the recommended path is to install the daemon as a user service and let it bootstrap your roots from `daemon.toml`. The shape below is what works _today_. !!! ## 1. Get a binary Either: - Download a release binary from [the releases page](https://git.tfks.net/tfks/dropbear/releases) and put it on your `PATH`. - Build from source: clone the repo, run `just install` (requires Go 1.25+). Confirm: ```shell $ dropbear version ``` ## 2. Get a bucket Any S3-compatible bucket will do. Common picks: - **Cloudflare R2** — cheap, zero egress, region is `auto`. - **Backblaze B2** — cheap, simple S3-compatible interface. - **AWS S3** — the reference. - **MinIO / Garage / SeaweedFS** — self-hosted. Note the **endpoint URL**, **region**, and **bucket name**. ## 3. Put credentials in the environment For interactive use of `dropbear sync`, `dropbear init`, and friends, Dropbear reads credentials from environment variables. Use whichever name pair your provider expects; Dropbear honors `DROPBEAR_S3_*` first, then falls back to `AWS_*`. ```shell export DROPBEAR_S3_ACCESS_KEY=... export DROPBEAR_S3_SECRET_KEY=... ``` The daemon installed in step 5 cannot inherit your interactive shell environment — it reads credentials from a separate env file (next step). ## 4. Drop credentials in the env file Create the canonical env file the daemon will read at start. systemd and launchd do not inherit interactive shells, so `dropbear daemon install` refuses to write a service file without it. | Platform | Path | | -------- | ---- | | Linux | `~/.config/dropbear/env` | | macOS | `~/Library/Application Support/dropbear/env` | ```shell $ mkdir -p "$(dirname ~/.config/dropbear/env)" # Linux # or: mkdir -p ~/Library/Application\ Support/dropbear # macOS $ install -m 600 /dev/null ~/.config/dropbear/env $ cat > ~/.config/dropbear/env <` manually, then add the plain `[[roots]]` entry to `daemon.toml` and restart. ## 9. Alternative: manual `dropbear init` If you'd rather not use the daemon — or want explicit control over root creation — you can run `dropbear init` per root and trigger `dropbear sync` yourself: ```shell $ dropbear init \ --root-id photos \ --device-id laptop \ --mode bidirectional \ --remote-bucket my-bucket \ --remote-endpoint https://abc.r2.cloudflarestorage.com \ --remote-region auto \ ~/Pictures $ dropbear sync ~/Pictures ``` Drive subsequent syncs however you like: cron / systemd timer / launchd / shell hooks / external file watcher wrapping `dropbear sync` / manually. The daemon does the watcher path better, but the CLI works fine on its own. ## Verification ```shell $ dropbear status ~/Pictures # show configured state $ dropbear scan ~/Pictures # what's changed since last sync $ dropbear plan ~/Pictures # what next sync would do (dry-run) ``` ## Where things live ``` ~/Pictures/ your synced folder ├── ... your files └── .dropbear/ ├── root.toml identity + remote config (committed to git? no — it has the bucket endpoint) ├── state.sqlite local state (never commit; never share between devices) ├── ignore optional .gitignore-shaped exclude file └── restore-tmp/ transient; cleaned automatically ``` In the bucket: ``` /roots// ├── blobs/// content-addressed blobs (deduplicated, sharded) └── devices/ ├── registry.json active + retired devices └── / ├── head.json pointer to this device's latest manifest ├── manifests/.json full JSON snapshots, one per sync run └── tombstones/.json explicit-delete records (per-device monotonic seq) ``` If you ever need to walk away, this layout is open. You can `aws s3 cp` the bucket somewhere else and the manifests are plain JSON you can parse with any tool.