- How long is this stored for? Is it temporary?
I don’t know the js implementation that much but by default the file is pinned on your node (so your node will provide it forever).
If someone else fetch it they will either not reprovide it if they disabled this feature, else this will stay until they run a garbage collection
ipfs repo gc or automaticaly with the
ipfs daemon --enable-gc.
- What happens if I turn off my computer and then someone else tries to retrieve it?
Theoricaly if an other other people have the file they will send it, but that rare as much of the time you don’t publish one file but many and nodes will only download a few subset of that (eg. someone fetching your website might reprovide the
index.html but not your subpages if he havn’t visited them).
If you want your file to be reliabely accessible on the network you should think that if you don’t provides your files, no one will (what is good about ipfs is that if lots of peoples download your file they will reshare it, so your bandwith usage scales negatively (more users = more bandwith)).
- If its lifetime is temporary, how do I make it permanent?
You can either do it manualy using
ipfs pin or through a cluster managing your pins using ipfs cluster even if you don’t want to use the cluster feature (syncing the pins of multiples server) I would still advise you to setup a cluster along with your server as this is simple and provides async pinning and more features than the raw
go-ipfs (such as names, expirations date, …).
You could also pay a company to host them for you (somes are listed here https://docs.ipfs.io/concepts/persistence/#pinning-services), I’ve personaly tryed the free plan of pinata for a short while and I have nothing to say, it works likes you expect a pinning service to work, they pin your file and provides them, latency and bandwith is very average for what you can expect from any VPS you can setup (you might get better performance if you subscribe to the entreprise option (you will have your own VPS)).
PS: I’ve realised I havn’t actualy explained pinning, so you can pin files, directory, and there child, …
Pinned objects are never removed from the repo and if they are not in the repo they are downloaded from the network, it’s the canonical way to ensure your files are always available on the ipfs network.