0

How can I tell if my ipfs daemon is running in the background?

I'm able to execute command like jsipfs cat <hash>, but I'm pretty sure my daemon isn't running. I can't seem to find a process named "ipfs" in my process list.

Is there a one-liner command to verify if the ipfs daemon is actually running?

nz_21
  • 6,140
  • 7
  • 34
  • 80

1 Answers1

1

Some commands work offline - jsipfs cat Qmfoo will work if you have the whole file in your local repo for example.

If you run a command that requires being online like jsipfs swarm peers for example, it'll print a message like This command must be run in online mode. Try running 'ipfs daemon' first.

achingbrain
  • 191
  • 2
  • thanks for the clarification. Is it possible to know which commands run offline? `ipfs add` seems to work fine offline, but that doesn't make sense. How can it upload anything into the network if the daemon isn't running? – nz_21 Nov 11 '20 at 15:36
  • When you run `ipfs add`, you aren't uploading anything to the network, just adding it to your local node. The only thing being offline means is that people can't pull the content from your node. – achingbrain Nov 12 '20 at 22:58