I’m currently hosting my own ipfs on AWS EC2(ubuntu), and I’ve noticed that the IPFS block files are growing incredibly fast, taking up about 100 GB at the moment . It seems like the my instance is just seeding for the IPFS network, and I’d like to figure out how to stop that.
Thank you
ipfs:
image: ipfs/kubo:v0.14.0
ports:
- '5001:5001'
volumes:
- ./data/ipfs:/data/ipfs
this is the docker-compose file I am using right now.
First, upgrade to the latest kubo version.
Second, can you tell us specifically what folder in the .ipfs folder is growing and by what amount?
The instance does not store blocks that you didn’t add or retrieve.
blocks
folder is about 60GB at the moment.
There is no code to do that.
Usually when that happen it’s because you have a public unauthenticated gateway or API ports.
There are botnets scanning nodes on the network, finding ones who have open gateways and API ports and using them to store content.
If I read - '5001:5001'
you are exposing the private Admin API port to anyone on internet.
You should also update your node, really.
1 Like
Thank you so much for your answer. It really helps a lot.
I have one more simple question.
Can I just manually clean up the ipfs blocks
folder to save up storage space?
Will it break my current ipfs node?
the safe way is to do ipfs repo gc
if there were pins that were added you can view them with ipfs pin ls --type=recursive
, then remove them ipfs pin rm
and finally ipfs repo gc
to clean it up
1 Like
I have uploaded some codes to IPFS.
Will it be matter if I run ipfs pin rm
?
ipfs pin rm
takes a CID as argument.
Don’t remove your own pins, however if you find pins that shouldn’t be there remove them.
1 Like