Connecting CLI to Helia node fails with error

I have installed IPFS Kubo and tried connecting to the Helia node (nodejs application) via the following command:

ipfs --api /ip4/ id

where 5022 is the port Helia node is listening on. However, the above command throws multiple errors in no particular order. Following are the errors:

// error 1<random_port> -> - connection reset by peer

// error 2 with IPFS_LOGGING=debug
2023-06-21T14:02:13.513+0530    DEBUG   cmd/ipfs        ipfs/main.go:157        config path is /Users/<user>/.ipfs
Error: EOF

Following is the machine configuration:

Kubo version: 0.20.0
Repo version: 13
System version: arm64/darwin
Golang version: go1.19.8

What I want is a content gateway server powered by the Helia node. Following is the Helia configuration:

const blockstore = new MemoryBlockstore();
const datastore = new MemoryDatastore();
const libp2p = await createLibp2p({
    addresses: {
        listen: ["/ip4/"],
        announce: ["/ip4/"],
    transports: [tcp()],
    connectionEncryption: [noise()],
    streamMuxers: [yamux()],
    peerDiscovery: [
	    list: [	 

const helia = await createHelia({

IPFS CLI Configuration is the default one. Please let me know if you would like to take a look at that and I will post it.

can you show what command you are running to get that:

I am executing the following command:

ipfs --api /ip4/ id

I have noticed error 1 a few times in the terminal. Majority of the times, the error is always error 2. In both cases Helia node was running.

the listen port isn’t the API it’s a public P2P swarm port, I don’t understand what you are trying to do

1 Like