GlobalObject: back up onto your friends' disks, and let them back up onto yours
Here’s an idea I started poking at a few weeks ago. Plenty of us have a machine at home with a few hundred gigs of disk doing nothing, and plenty of us don’t have a proper off-site backup.
What if the cloud storage provider was everyone’s spare disk?
You share a slice of your disk with a pool of people. In return, your folders get backed up onto their machines. Everything is encrypted before it leaves your computer, so nobody else in the pool can read it, including whoever runs the pool. Lose the laptop and you get it all back with 12 words.
That’s GlobalObject, and v0.1.0 is tagged and building release binaries. Before you get excited:
It’s a prototype. Don’t put real data on it. It’s been tested on loopback only and nobody independent has reviewed it. I’ll come back to what that means.
The rules I started with
The very first note for this project had three requirements in it, and they’ve survived:
- Data is encrypted before it’s stored on anyone else’s system.
- It lives on at least three different disks.
- You only get as much remote space as you bring to the party, and only at the speed of your own link, and you can’t cheat that by modifying your client.
Number three is the fun one. Nobody pays anybody; the currency is disk and upload bandwidth.
How it works
One backup. The clever bit is the order: encrypt first, split second.
There are three parts. The client on your machine does the backup, and it’s a normal restic-format repository (deduplicated, encrypted with your key). Each repository file is then split into n pieces where any k rebuild it, and the pieces go to different members on different networks.
A node is the slice you share. It stores other people’s pieces, has no idea what they are, and only hands one over against a short-lived signed grant.
The pool server decides where pieces go, signs the grants, keeps the ledger of who’s storing what for whom, audits that pieces are still there and drives repair when a machine vanishes. It holds no keys and no file names, and no backup data passes through it. Pieces go member to member.
Because the splitting happens after encryption, repair can rebuild a lost piece from the surviving ones without your keys, and without your machine even being on.
Don’t write your own crypto (or your own anything)
The first version of the design had rather too much custom code in it for my liking. I pushed back, and the storage, crypto and transport are now all other people’s work:
- restic’s repository format via
rustic_core, for chunking, dedupe, encryption and snapshots irohandiroh-blobsfor connections between members (hole punching included) and verified transfers- PASETO tokens via
pasetorsfor the grants and receipts - MongoDB for the pool server’s state (I work there, so no prizes for guessing, but it also needed transactions)
What’s left as custom code is the bit that is the product: the reciprocal quota and bandwidth ledger, and the placement rules. None of it invents cryptography.
Three ideas the research talked me out of
I had Claude go and do proper research on a few things that sounded like good ideas at the time. None of the three survived, which is exactly why you ask.
“Erasure coding is obviously better than three copies.” There’s a simulator in the repo that models home machines coming and going, and it disagreed:
| Policy | 1 GiB file readable | Usable per TB shared |
|---|---|---|
| 3 copies (1-of-3) | 98.6% | 267 GB |
| 5 copies (1-of-5) | 99.9% | 160 GB |
| 10-of-20 | 98.1% | 400 GB |
| 10-of-16 | 85.0% | 500 GB |
Erasure coding buys you space, not availability. And with a pool that’s mostly laptops (52% mean uptime), 10-of-20 falls to 24% of files readable while plain three copies holds 89%. So small pools get copies, and a pool only switches to erasure coding once it’s big enough and its machines are actually on.
“Port the good bits of Ceph or ZFS into Rust.” Score: 0 of 11 of my problems fixed. Both assume the nodes are trusted and fail by crashing, not by lying. My nodes are other people’s computers. Rewriting something in Rust changes the language, not the threat model (and the licences rule it out anyway).
“Only accept ZFS send/receive, that’ll simplify things.” It would have deleted about 340 lines and then needed roughly 1,700 new ones, because it removes the only data-encryption layer and somebody has to rebuild it.
The simulator also handed me the least marketable number in the project: restoring on a 20 Mbps upload link with no banked credit takes 4.6 days per TB. Fair shares cut both ways!
What using it looks like
Someone running a pool sends you a join link. You open it and run the one command it shows:
curl -fsSL https://cp.example.org/install.sh | sh -s -- --join https://cp.example.org/join/1a2b3c…
It asks four questions: your recovery phrase (12 new words by default, write them down on paper), how much disk to share (a quarter of your free space), which folders, and how often. After that a background service does the backups, serves your slice, and gives you a dashboard on 127.0.0.1.
You get roughly a quarter of what you share as backup space. New machine? Install, type the 12 words, and it finds your account from the phrase alone.
Running a pool is one script on a Linux server with Docker and a DNS name. It brings up the pool server, MongoDB, Caddy for HTTPS, a nightly database dump and (optionally) Prometheus with alert rules, then prints the first join link.
So how unfinished is it?
Honestly, quite:
- Tested on loopback only. Real home networks, real NAT, real flaky Wi-Fi: not yet.
- No independent review of any of it.
- Several of the dependencies are pre-1.0 themselves.
- macOS services, the systemd units and the Docker Compose stack were written but not run in the sandbox it was built in.
- No Windows, no OS keyring for the phrase, no self-update.
What has been run is 46 end-to-end tests, and a demo with real processes where five owners join, back up, one gets kill -9’d and the pool repairs its pieces onto the others before a restore. That demo caught the script killing a shell wrapper instead of the actual agent, so for a while “survives losing a node” was passing because no node had been lost. Glad I looked.
TL;DR
- Share spare disk with a pool, get encrypted backup space on everyone else’s.
- restic format, split into pieces after encryption, placed across different networks, audited and repaired without your keys.
- You get out what you put in, in space and in bandwidth.
- v0.1.0 is a prototype. Play with it, break it, don’t trust it with anything you can’t lose.
The code’s at metahertz/globalobject, with the design docs, the threat model and the simulator report alongside it. If you fancy being Alice, Bob or Carol in a test pool, let me know.
Happy hacking!
-Matt