IPFS Gateway that fetches from specifc peers but serve to all peers in the network

Is there a way to create a network of IPFS Nodes that only fetch files from each other i.e., some explicitly mentioned peers, but serve the files to all the peers on the network ?

All the existing ways like a private network with swarm key, removing bootstrap nodes list and adding peers to peerlist, turning noFetch on will stop the peers from fetching the files from other peers and only serving files present locally/internal network but it would also restrict the nodes from serving files to other peers which we need in our use case

If you explicitly wanted an HTTP gateway, you could use an IPFS private network of nodes with the data you want to have, and have them serve over HTTP (Kubo comes with a built-in gateway you can make public with a reverse proxy). That way only the CIDs you put into your network are served.

Would that work?

If I understand you correctly, add your nodes to the bootstrap section in the config file. I have two nodes that connect via a bootstrap entry. They are always connected. I can access what I upload from either node without waiting for normal propagation. Yet the nodes still work as normal nodes.

Node 1 should have Node 2 in the bootstrap section and vice versa.

1 Like