I’m not sure where I read about IPFS deployment for the first time but I’m sure it was a tutorial whose first step was to run the ipfs daemon. I’m now deploying a webapp to IPFS using the ipfs add command but despite I sometimes forget to run the daemon first, the addseems to work just fine.
I say seems because I’m not always able to access the file later – this could be just the propagation times. The thing is that it always work when I run the daemon first.
My question then is: is it necessary to run the daemon in order to add files to IPFS? And if not, how does the CLI talks to the network?
If you are not running the daemon it will just add locally.
The issue is probably that when running the daemon, the blocks are advertised to the network (put on the DHT). When you don’t run the daemon and you start it later, the blocks will be advertised the next time the “reprovider” runs (which appears to be one minute after starting). Until then, that content will not be retrievable.
If you have many blocks to provide, the providing process may just take longer I guess.