An error on Windows: Error: api not running

From @slrslr on Tue Nov 22 2016 23:15:00 GMT+0000 (UTC)

Hello,

i downloaded https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_windows-amd64.zip to my Windows 10 64bit and copied ipfs.exe to C:\Windows

then initialized it by command:
ipfs init

After some time i returned and wanted to play with ipfs but when executing commands like:
ipfs files ls
ipfs ping 1
ipfs diag cmds

i am getting an error: “Error: api not running”

How can i fix it, discover cause please?

Update: after running “ipfs daemon” error no longer appears.

Copied from original issue: https://github.com/ipfs/faq/issues/197

From @VictorBjelkholm on Wed Nov 23 2016 08:37:07 GMT+0000 (UTC)

It’s not related to running it on windows but rather that you haven’t run the daemon in the background before running. Many commands require you to run them in “online mode”, which means the daemon needs to have started before.

ipfs daemon in a separate terminal will do just that. Then you can use the commands you want.

Read through the “Getting Started” on ipfs.io and it’ll explain all this + more. You can find it here: https://ipfs.io/docs/getting-started/