IPNS in real usage

I’m really interested in the usage of IPFS in my project. Now I’m trying to find out how to use the IPNS in the right way.

All articles show as to create hash for CID, but what if I need to update/change CID in already available IPNS entity.

For instance,

  1. I create an object in IPFS and get CID “A”.
  2. Then I create IPNS hash for CID “A”
  3. and share IPNS hash with somebody.
    After some time, I decided to create a new object with other content and do it. As the result, I get CID “B”.

Question, how to let IPNS know that It should resolve CID “B” instead of CID “A”?

I could find any good example. Only some basic trivial cases.

It’s the same as the first time you publish the IPNS entry. You just publish it again with a different value for what it should point to. The IPNS hash address is based on the public key you use, so you can use the keys interface to generate as many identities as you need to publish all your IPNS content. There is no special update process. It will just resolve the most recently published IPNS listing that is correctly signed with the key that the IPNS address is based on.

Also keep in mind IPNS expires and must be republished regularly too, at a minimum daily, but I think every 8 hours or so is a reasonable interval for republish.

Also worth noting, IPNS is currently pretty slow and somewhat unreliable to resolve at the moment, and it’s going to be updated soon with a new Pubsub based backend, which might include features like having other users (perhaps people who are pinning / cohosting your stuff) handling the republishing for you so a lot of this stuff might change a bit over the next year. At the moment IPNS isn’t really reliable or fast enough to be usable for most interactive applications like web hosting, which is why DNSLink is suggested instead where possible, for now

Thx you so much! Why so interesting information is missed in most of all articles? (

About expiration time I knew. ) Probably, do you know about IPLD and DAG? I have similar a question there too (

I guess that I should increase sequence number for next one entity. Right?