Impossible / very hard time to connect jsipfs node to IPFS Desktop

  • OS: MacOS
  • Version of IPFS Desktop v2.13.0

Describe the bug
Hello, I am trying to develop a NodeJS API which enables users to interact with an IPFS node owned by the API.

What I want to do is for testing purposes to verify that when I programmatically pin a new file, this one is currently retrieved and pinned on the node I create in my NodeJS code.

I also expect that shutting down and restarting the NodeJS code won’t have an impact on data persistence as it will always look at the same folder (~/.jsipfs).

I have a very hard time to use the IPFS Desktop as a dashboard to see the current state of my jsipfs node running with my API.

I tried following the instructions from the UI that is displayed when no connection can be established but without success.
I also tried to connect using /ip4/ instead of 5001 as proposed, because my code displays the 4003 and 4002 ports as the one being used.

I tried changing the config file of ipfs-desktop in order to point to my .jsipfs folder instead of .ipfs.
I can’t even use the cli command jsipfs repo stat as an alternative to ipfs-desktop as the folder is already locked by my API.

To Reproduce
Steps to reproduce the behavior:

  1. Start a daemon from JS with for example :
import * as IPFS from "ipfs-core"
const node = await IPFS.create()
  1. If you try any command with the jsipfs cli like jsipfs repo stat you will be refused access, which confirms the node runs well.
  2. Edit the config file of ipfs-desktop to make it point to the jsipfs repo. Especially change these two lines :
	"ipfsConfig": {
		"type": "js",
		"path": "/Users/nex/.jsipfs",
  1. Start ipfs-desktop
  2. It should not be able to connect to the node

Expected behavior
I expect the UI to be a reflection of the repo that is hosted in the .jsipfs folder. When a file is added from JS for example, it should be seen on the IPFS Desktop UI.

Additional context
My issue seem very common but I couldn’t find anything related when searching on internet.
I am sorry if the solution is trivial.

Thank you for your help.


It happens that there is something called webui that is built in with the daemon that you can use by going on by default.

I ended up using in my NodeJS code the ipfs-http-client package instead of ipfs-core.
The difference is that ipfs-http-client connects to an already running daemon while ipfs-core runs a node itself.

My running daemon was then a jsipfs node but it is unable to automatically connect to new peers. So I decided to run a standard ipfs node using IPFS Desktop.
I then connect to it with ipfs-http-client in my code and execute actions on it.

Hope it can help someone !