IPNS not resolvable from other node

I’ve got a js-ipfs application adding a file and publishing the cid at an ipns address. From the same node I can resolve the ipns entry but not from any other. If I manually copy over the CID however I can retrieve the file.

node.name.publish(cid, {
        key: keyName,
        allowOffline: false,
        lifetime: "168h"


Hello HLK,
Are you using IPNS over Pubsub?
js-ipfs does not have the DHT enabled by default, which is necessary to find IPNS records across the network. The current solution while we work on improving the DHT as go-ipfs did, is to use IPNS over pubsub.

// * IPNS resolve subscription test
// * 1) name.resolve() , which subscribes the topic
// * 2) wait to guarantee the subscription
// * 3) subscribe again just to know until when to wait (inside the scope of the test)
// * 4) wait for the other peer to get notified of the subscription
// * 5) publish new ipns record
// * 6) wait until the record is received in the test scope subscribe
// * 7) resolve ipns record
You can see an example interop test for this that you can try to replicate: https://github.com/ipfs/interop/blob/master/test/ipns-pubsub.js#L89

Thanks for the answer, I’ll give it a try.

@HLK try including { resolve: false } with your name.publish(), as per the tests.

If you want to see my code, I’ve got this working and submitted a PR for an example here: