Can I configure my IPFS node to only host my pinned files?

I want to host an S3-backed ipfs node that will seed* my site’s users’ content on the IPFS network. I want to avoid paying for storage to host files that were not created by the website’s users. Is there a way to configure the IPFS node to only store files that I explicitly pin or request via the API, without participating in storage of other files?

thanks!

*pardon the possibly naive terminology borrowed from bittorrent; I’m new to IPFS.

IPFS does not host files you don’t pin.

The behaviour you are asking for is already what is out there.

(a small difference, if you download a file, by using ipfs get or using the gateway for example, IPFS will cache it until the next garbage collection happen)

thanks @Jorropo , my colleague reports ~78 files were hosted almost immediately upon starting the node. Is there some bootstrapping that happens / is this normal when starting a new node?

When you start IPFS initialise the repo with some samples text files you can use ipfs init --empty-repo or remove all pins and run gc to remove them.

I guess it’s that ?

It could also be that they fetched some files using the gateway or a command, and this is just cached stuff.

What I’m 100% certain is that IPFS will not walk arround the network hosting files randomly.

1 Like

You can also configure the gateway not to fetch content that isn’t on your node.