Services
IPNS

Pinning

What is IPNS?

The InterPlanetary Name System (IPNS) is a system for creating mutable pointers to CIDs known as names or IPNS names. IPNS names can be thought of as links that can be updated over time, while retaining the verifiability of content addressing. In this case in particular, they are mostly used to represent IPFS files (through their hashes).

If you want to know more about IPNS and how it works you can read it here (opens in a new tab)

Creating an IPNS record

Creating an IPNS record refers to the creation of an IPNS record and signing it with a private key. Note: Currently Fleek holds the private key with wich all records ar being sigend, in future iterations there will be an option for the user to manage their own keys.

To create your first IPNS record you can do as follows

To create an IPNS record using the CLI you need to be authenticated, with a project selected and use the create command.

Creating an IPNS record
    > fleek ipns create
    > Success! IPNS record created.
    > k51qzi5uqu5didozh8jmvbnowwj2d545yacagcply19yvjz8rhn0i1hrbw2thy
 

With the IPNS rescord created you can now update it with a CID and publish it to the the different nodes so it can be resolved.

Publishing a record

Publishing an IPNS record means advertising it so that other nodes can resolve it, thus mapping the record to a CID so that the gateway can resolve to it and direct user to the set content.

To publish an IPNS record you can do as follows

To publish an IPNS record with a CID using the CLI you need to be authenticated, with a project selected and use the publish command.

Creating an IPNS record
    > fleek ipns publish k51qzi5uqu5didozh8jmvbnowwj2d545yacagcply19yvjz8rhn0i1hrbw2thy QmRG4xcsmoZuXqKuPz3uVBgvo3GZ6k1kLZWhmvzuKtDr9s
    > Success! IPNS record published.
 

Resolving an IPNS record

Fleek comes with a built in resolver for IPNS that allows you to get the CID based on an IPNS record.

You can use the resolver to see if what is mapped to a record (yours or someones elses).

To resole an IPNS record using the CLI you need to be authenticated, with a project selected and use the resolve command.

Creating an IPNS record
    > fleek ipns resolve k51qzi5uqu5didozh8jmvbnowwj2d545yacagcply19yvjz8rhn0i1hrbw2thy
    > Success! /ipfs/QmRG4xcsmoZuXqKuPz3uVBgvo3GZ6k1kLZWhmvzuKtDr9s
    
 

Listing records

If at any time you want to check all the IPNS records that were created / published with this project you can do so

To resole an IPNS record using the CLI you need to be authenticated, with a project selected and use the resolve command.

Creating an IPNS record
    > fleek ipns list
    > Success! /ipfs/QmRG4xcsmoZuXqKuPz3uVBgvo3GZ6k1kLZWhmvzuKtDr9s
    id                         name                                                            hash                                          
    -----------------------------------------------------------------------------------------------------------------------------------------   
    clcuq190y0000jt08mpjw7pdz  k51qzi5uqu5didozh8jmvbnowwj2d545yacagcply19yvjz8rhn0i1hrbw2thy  QmRG4xcsmoZuXqKuPz3uVBgvo3GZ6k1kLZWhmvzuKtDr9s