How do I make my IPNS records live longer?

iirc DHT nodes will drop stored values after ~24h, no matter what Lifetime and TTL you set.
Someone needs to keep reproviding your signed IPNS record every day, or it will be “forgotten” by the DHT.

Tip: if you enable Ipns.UsePubsub then DHT limitation is lifted, and you can fully benefit from longer Lifetime: other peers who are following the same IPNS name can send you a valid, signed IPNS record, even if it is no longer available on DHT (see Layering persistence onto libp2p PubSub).

Mostly correct. The caveat is that DHT is dropping records older than 1 day, and Kubo nodes are not re-providing third party signed records on DHT, only on PubSub, but that is not enabled by default.

In case of Kubo IPFS implementation, IPNS things you can adjust are:

  • Lifetime (ipfs name publish --lifetime, or the global Ipns.RecordLifetime)
    Controls how long a singed IPNS record is valid (how long, in theory, a third-party service or peer without a private key can re-publish it on your behalf to keep it alive).
  • TTL (ipfs name publish --ttl)
    Controls for how long IPNS resolver can cache a record before trying to resolve it again (to check if there is a new version).
  • Ipns.RepublishPeriod
    (iirc) Controls how often your node will bump Sequence and publish new signed IPNS record. It is ow enough to account for network churn and DHT “forgetting” records older than 24h.
  • Ipns.UsePubsub
    Disabled by default in Kubo (tracking issue), but enabling it is a good idea if you plan to publish IPNS records with long Lifetime.

Correct.

We don’t have “IPNS Pinning Services” yet, but someone could create one. A service that periodically resolves IPNS name via DHT and listens on IPNS pubsub channel and then re-provides long-Lifetime records on both. This “IPNS keepalive” can be done in “trustless” manner, without revealing private keys to the service.

Some relevant work I am aware of :

6 Likes