I'm using IPFS to host a website and I need a way to keep the website files online all the time.
I know that ipfs has a garbage collector that removes the content after 24 hours.
And that if I pin the content with ipfs pin add <file>
then it's like adding the file again so it's not deleted from the network.
Now my question is How do I keep my IPFS files online forever?
Can I create a cron job to keep re-pinning the content every 24 hours? or is there a better way?
Best Answer
Once a piece of content is pinned, it is stored forever on your node until you explicitly unpin it. There is no need to pin a file more than once. If you pin a file, it never gets garbage collected like the files that are not pinned do.
From the IPFS Pinning Example: