MacLustr integration and operations guide
Where things run
| What | Where |
|---|---|
| Coordinator + gateway | mld app maclustr-storage, pinned on m4mn, dir ~/apps/maclustr-storage (a clone of this repository), PM2 storage-coordinator (8870 gateway, 8871 LAN HTTPS) and storage-backup (03:45) |
| Public route | https://storage.spboucher.ai — DNS A → 51.161.112.61 (GoDaddy, created 2026-12-01), Caddy route on BHS64 posted by mld deploy |
| Data | m4mn:~/maclustr-storage/ — fragments/, coordinator.db, uploads/, backups/ |
| Secrets | m4mn:~/.config/maclustr-storage/ — master.key, ticket.key, admin.token, LAN certificate. Generated on the node at first start. Copy kept outside git on the operator's Mac |
| Dashboard | Command Center (M4M64c), page /mobile-storage; reads MCC_STORAGE_URL with the token file ~/.config/mcc/storage-admin.token |
| mld manifest | M1M32:~/dispatch/apps/maclustr-storage.json |
Do not run mld move (data and keys do not follow) nor mld adopt (the repository has another name than the app).
Deploying a change
Server code lives in server/. On the node: cd ~/apps/maclustr-storage && git pull && pm2 restart storage-coordinator.
There is nothing to build (Node runs the TypeScript directly) and no dependency to install. Run node server/test/e2e.ts
before pushing. First installation on another node: clone, bash server/scripts/setup.sh, write an mld manifest like the
existing one, mld deploy, then restore ~/.config/maclustr-storage and ~/maclustr-storage if moving.
Settings are environment variables in the manifest (server/src/config.ts): MSC_FRAGMENT_MIB (8), MSC_MOBILE_REPLICAS
(2), MSC_VERIFY_INTERVAL_S (21600), MSC_OFFLINE_AFTER_S (100), MSC_LAN_PORT (8871, 0 = off), MSC_BONJOUR.
Daily use (mlstore, on the node)
cd ~/apps/maclustr-storage && alias mlstore='node server/bin/mlstore.ts'
mlstore status # stable store, mobile nodes, capacities, integrity
mlstore pair "iPhone de Simon" # pairing code + QR payload (the dashboard shows the QR code)
mlstore put big.tar archive-2026.tar --class=archive
mlstore ls ; mlstore show <object> ; mlstore get <object> out.tar ; mlstore rm <object>
mlstore node <name|id> # detail, events, transfers, tasks, benchmark
mlstore verify <node> ; mlstore retrieve <node> 4
mlstore suspend|resume|drain|revoke|forget <node>
mlstore events 50 ; mlstore transfers 50From another machine: MSC_URL=https://storage.spboucher.ai MSC_ADMIN_TOKEN=… node server/bin/mlstore.ts status.
Using the fabric from another MacLustr service
PUT /admin/v1/objects?name=&class= with the raw body, keep the returned id and sha256; GET /admin/v1/objects/{id}/content to read (API.md). Suitable for what the brief lists: archives, secondary backups, datasets,
model files, research artefacts, rarely read data. Not suitable as a primary store: the stable copy is on one node today
(ARCHITECTURE.md §8).
Adding a device
Dashboard → Mobile Storage Nodes → Add a device → scan the QR code in the app (or type the code) → choose the capacity →
Activate. Revoking, draining and suspending are in the node's drawer. A revoked or drained node disappears from the list
with mlstore forget.
Backups and recovery
storage-backupwrites a consistent copy of the catalog to~/maclustr-storage/backupsdaily (14 kept) — same disk.- To recover on a new node you need both
~/.config/maclustr-storage/master.keyand a catalog: without them the fragments (stable or on phones) cannot be decrypted. - If stable fragments are lost but the catalog and key survive, the coordinator pulls what the phones hold as they come online.
Apple side
Bundle ai.spboucher.maclustr.storage (App ID L2G5ZM34K3), App Store Connect 6841553137, team 3YM54G49SN. App ID and
record were created through the signed-in Safari session (Scripts/portal/). Release: bump CURRENT_PROJECT_VERSION in
project.yml, then Scripts/release.sh all and python3 Scripts/testflight.py --apply.