PigeonFS
Storage servers anyone can run. They keep rooms, records and file pieces, so what you share is there when you come back.
Storage servers
A storage server keeps PeerPigeon storage for any app and any room, the way a relay carries anyone's signaling. Every PeerPigeon peer looks for servers and uses them when there are any; with none, storage works across the mesh alone.
- Found like relays. A server announces the role
storagein one scope (peerpigeon-storage/servers), and relays list it first. A peer dials only the servers it needs, over WebRTC. - Kademlia placement. A room's records live on the 3 servers whose ids are closest to the room's id. When a server joins or leaves, they move to whichever servers are now closest.
- Moved, not copied. When a room's servers come up, a peer sends them what it keeps and drops what it does not use, reading it back when asked. Writes go to the servers as they happen, and changes come back from them.
- Signed. Every change is signed by its writer, and a server takes a user record only from its owner.
- Blind. The room's id, each record's slot and its space are hashes of the room's secret, and each record is the room's own ciphertext. A frozen slot is never overwritten.
Files
Files are cut into 128 KB chunks. A file's manifest lists each chunk's SHA-256, and its id is the SHA-256 of the manifest, so every chunk and manifest is checked against its hash on arrival: any copy is as good as any other.
- Sealed on the servers. A peer puts every file it holds on the servers too, each chunk sealed with a key made from its own hash. A server can't read it, and the same chunk is kept once whoever adds it. Each chunk sits on the 3 servers closest to its address.
- From everyone at once. A fetch asks every peer holding the file for its chunks, then the servers. Once whole, the fetching peer holds it too.
- Three live copies. Peers lend space (1 GB by default in a page, 10 GB for a Node peer) and fill it with copies of files the mesh holds too few of.
Apps such as PigeonFeed keep their pictures and video this way.
Where it keeps things
A server keeps records in its data folder, one folder per room (rooms/), and file chunks under blobs/. In a browser, a peer keeps what it holds in IndexedDB.