examples icon indicating copy to clipboard operation
examples copied to clipboard

Interacting with the IPFS daemon running as a user LaunchAgent?

Open adamavenir opened this issue 8 years ago • 4 comments

If I run the IPFS daemon as a "LaunchAgent" as described here, then start it as described, I see it show up:

➜  ~ launchctl list | grep ipfs
-   127 io.ipfs.go-ipfs

But if I run ipfs swarm peers, I get:

Error: This command must be run in online mode. Try running 'ipfs daemon' first.
Use 'ipfs swarm peers --help' for information about this command

I'm sure I'm misunderstanding something about how this works. :)

adamavenir avatar Jun 14 '16 15:06 adamavenir

Hrm... I wonder where the ipfs dir gets placed in that case. the CLI might not be looking in the same path as the launchctl manager.

cc @diasdavid @dignifiedquire who know more about ~~OSX~~ Mac OS Than I do

whyrusleeping avatar Jun 14 '16 15:06 whyrusleeping

in theory it should work, but it might be tht the home directory detection fails. Try setting IPFS_PATH="./.ipfs" in the script explicitly (user based scripts run in the user home dir by default)

dignifiedquire avatar Jun 14 '16 16:06 dignifiedquire

I have the same problem. It seems that there is a problem when running under a different user account. My setup is as follows:

  • Win 10
  • Run as service as SYSTEM user (using Winsw)

Everything works as expected when I run ipfs daemon manually in one console window and the other commands in a different console.

Manually setting the IPFS_PATH works too.

fubar-coder avatar Mar 01 '18 10:03 fubar-coder

I had the problem "Error: this command must be run in online mode. Try running 'ipfs daemon' first", because I try exec this with another user in terminal.

tks @fubar-coder

falehenrique avatar Sep 29 '18 16:09 falehenrique