Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Peer-to-peer distribution

solnix distributes both its binary cache and this website peer-to-peer, so the more people use solnix, the faster and cheaper it gets for everyone — bandwidth scales with the community instead of with one origin’s egress bill.

Both forms of sharing are governed by the same privacy master switch as telemetry; see Privacy, telemetry & the community pulse.

Cache objects over BitTorrent

Each cache artifact (NAR) is distributed as a torrent, seeded by the hub and by other solnix users. When you have opted in, your machine seeds the public, signed cache artifacts it has fetched to other solnix users:

solnix.cache.seed.enable = true;   # default on when you have opted in
  • It only ever shares public Nix store paths — never your private data.
  • Integrity is enforced by the cache.solnix.io signature regardless of where the bytes came from, so a torrented NAR is exactly as trustworthy as one pulled over HTTP.

It complements the HTTP cache — it never replaces it

The narinfo served by cache.solnix.io always carries a plain HTTP URL: as the guaranteed fallback. A stock nix works today over HTTP; the peer layer is an enhancement layered on top. If no peer has what you need, Nix simply fetches it from cache.solnix.io as usual. See The binary cache.

The site over WebRTC

The solnix website itself can be shared browser-to-browser over WebRTC, so visitors help serve the site to each other. There are two distinct audiences here, governed by two different mechanisms — don’t conflate them:

Website visitors (your browser)

When you open solnix.io in a browser, sharing is off by default. No WebRTC connection is made until you actively opt in through the consent prompt at the bottom of the page (“Help serve this site?”). The choice is stored in your browser (localStorage, key solnix.p2p.consent.v1) and is revocable in one click from the “P2P sharing” toggle in the footer, on any page.

WebRTC exposes your IP address to the peers you connect to, exactly as any direct peer-to-peer connection does. That is inherent to how a swarm works and is why it is opt-in. It is a different posture from the telemetry promise (“region only, IP dropped at the edge”): the site never collects or stores your IP, but it cannot hide it from your peers. If you don’t turn it on, your browser never peers with anyone. See Privacy.

solnix machines (the OS)

A solnix host can participate in serving the site’s static files too. That is governed by a Nix module option on the machine, not a browser prompt:

solnix.site.p2p.enable = true;   # default on once you've opted in (privacy.enable = false)

This is a browser/host enhancement layered on top; the site always loads normally from the origin over HTTP regardless of whether any peer sharing is on.

Opting out

Because both features are gated by the privacy master switch, a machine whose config never touches it does not seed and does not share — the default is fully private. To opt into the community pulse and then pare P2P back:

Note the inversion: solnix.privacy.enable = false turns sharing on — it opts you in, it does not disable privacy. See the warning in Privacy.

solnix.privacy.enable = false;      # opt in

solnix.cache.seed.enable = false;   # ...but don't seed the cache
solnix.site.p2p.enable   = false;   # ...and don't share the site

The effective rule is the same one telemetry uses: (not privacy.enable) && <feature>.enable. The master switch always wins. We state this plainly so no one is surprised to find their machine seeding.