Skip to content

Run a storage server ​

A storage server keeps PeerPigeon storage for every app and every room, so what people share is there when they come back. Like a relay, it serves everyone; unlike a relay, it needs disk.

bash
git clone https://github.com/PeerPigeon/PigeonFS && cd PigeonFS && npm install
npm run server -- --dir pigeonfs-server

It announces the role storage to the relays, and peers find it and dial it over WebRTC. It also serves the PigeonFS page over https on port 5173; add --no-page to leave that out.

What it keeps ​

  • Records: one folder per room under rooms/. A room's records live on the 3 servers closest to the room's id, so a new server takes over some rooms and hands them on when it leaves.
  • File pieces: under blobs/, each sealed with a key made from its own hash.

It can't read any of it: room ids, slots and spaces are hashes of each room's secret, records are the room's own ciphertext, and file pieces are sealed.

Where its data goes ​

--dir, or the PIGEONFS_DIR environment variable, or pigeonfs-server in the current folder. Without one, it uses the folder it used last time, or a server data folder it finds on this machine's drives, and asks you to confirm. On a Mac, a folder on an external drive that isn't mounted stops it from starting, rather than filling the startup disk.

Which relay ​

--signal ws://<relay>/ws starts from a given relay; otherwise it uses PeerPigeon's choice, local relays first. To run a relay, a storage server and a PigeonAI server together on a Mac, see PigeonStack.

peer.ooo · peer to peer on PeerPigeon