# IPNS max lifetime

**URL:** <https://discuss.ipfs.tech/t/ipns-max-lifetime/2130>\
**Category:** Ecosystem and Usage\
**Tags:** use-cases-and-apps\
**Created:** [February 21, 2018, 4:30pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130 "2018-02-21T16:30:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nachomazzara](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/nachomazzara/32/706_2.png) [@nachomazzara](https://discuss.ipfs.tech/u/nachomazzara)\
**Post date:** [February 21, 2018, 4:30pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/1 "2018-02-21T16:30:53Z")

</div>

Hi all!

I have a doubt related to the lifetime when publishing an IPNS

[here](https://ipfs.io/docs/commands/#ipfs-name-publish) says lifetime is the time duration that the record will be valid for. But is not maximum defined in the docs.

[In this thread](https://discuss.ipfs.tech/t/confusion-about-ipns/1414) says it has a max of 24 hours and it would be great to confirm it.

[And here](https://discuss.ipfs.tech/t/how-does-ipns-interact-with-the-dht/262/4) there is a guy without response of what I am asking too.

So, lifetime is \<= 24hs, right? in you want to keep it for more time you must republish it? or there is another workaround?

## Little bit context of what we want to accomplish:

1. We provide a user a way to upload their own data into IPFS, using IPNS (local user ipfs node peer id). The user call an endpoint like /upload/:ipns

2. We store the IPNS inside our database and pin the IPFS hashes related to the sent IPNS

3. Use a website to show user data.

We can make the persistence of the IPFS hashes with the `pin` option, but we can not make the relation between IPNS and IPFS live forever with the 24 hours limit. And it is not something `happy` to ask the user to keep republishing the IPNS every 24 hours

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/josselinchevalay/32/3078_2.png) [@josselinchevalay](https://discuss.ipfs.tech/u/josselinchevalay)\
**Post date:** [February 21, 2018, 5:17pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/2 "2018-02-21T17:17:35Z")

</div>

by default IPNS publish for 24h but i think you increase that.

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [February 21, 2018, 8:09pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/3 "2018-02-21T20:09:47Z")

</div>

> [@nachomazzara](#):
>
> In this thread says it has a max of 24 hours and it would be great to confirm it.

The information in that thread is correct.

---

<div class="post-metadata">

**Author:** ![nachomazzara](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/nachomazzara/32/706_2.png) [@nachomazzara](https://discuss.ipfs.tech/u/nachomazzara)\
**Post date:** [February 21, 2018, 8:12pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/4 "2018-02-21T20:12:36Z")

</div>

Thanks!

Is there any workaround to make it works for more than 24 hours? Something like the owner of the IPNS let another node to do it?

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [February 21, 2018, 8:16pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/5 "2018-02-21T20:16:52Z")

</div>

No, we have not yet implemented delegated publishing of IPNS addresses. The linked thread is a bit long but I recommend reading through it; it thoroughly discusses IPNS timeouts and the related issues.

---

<div class="post-metadata">

**Author:** ![nachomazzara](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/nachomazzara/32/706_2.png) [@nachomazzara](https://discuss.ipfs.tech/u/nachomazzara)\
**Post date:** [February 21, 2018, 8:31pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/6 "2018-02-21T20:31:33Z")

</div>

Cool, thanks

Yeah, I read it (I think this is the four times haha)

You said:

```auto
The 12 hour limitation comes from level 3. In order to be able to publish permanent records, we'd need a some key-value store with actual consistency guarantees (like a blockchain).

```

I just want to confirm that nowadays it is not possible to make IPNS persistent even with a woraround.  
Maybe there is another way to achieve what we want. Just asking, Do you know any way to do it?

This:

```auto
Little bit context of what we want to accomplish:
1) We provide a user a way to upload their own data into IPFS, using IPNS (local user ipfs node peer id). The user call an endpoint like /upload/:ipns

2) We store the IPNS inside our database and pin the IPFS hashes related to the sent IPNS

3) Use a website to show user data.

We can make the persistence of the IPFS hashes with the pin option, but we can not make the relation between IPNS and IPFS live forever with the 24 hours limit. And it is not something happy to ask the user to keep republishing the IPNS every 24 hours

```

Thanks in advance for your fast response

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [February 21, 2018, 9:03pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/7 "2018-02-21T21:03:55Z")

</div>

> [@nachomazzara](#):
>
> I just want to confirm that nowadays it is not possible to make IPNS persistent even with a woraround.  
> Maybe there is another way to achieve what we want. Just asking, Do you know any way to do it?

Other than have (or pay for) some server to stay online and use your keys to republish, no.

* * *

It sounds like you’re building a pinning service that uses IPNS. Unfortunately, I can’t think of a good workaround that uses IPNS (other than to have users share their IPNS keys with you, one can make mulitple). However, you _can_ use something like dnslink. If you add a `dnslink=/ipfs/QmFile` TXT record to a domain (or the `_dnslink` subdomain), IPFS will resolve `/ipns/mydomain.com` to `/ipfs/QmFile`. However, this relies on the security of DNS (poor).

---

<div class="post-metadata">

**Author:** ![nachomazzara](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/nachomazzara/32/706_2.png) [@nachomazzara](https://discuss.ipfs.tech/u/nachomazzara)\
**Post date:** [February 22, 2018, 1:08pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/8 "2018-02-22T13:08:14Z")

</div>

`However, you can use something like dnslink. If you add a dnslink=/ipfs/QmFile TXT record to a domain (or the _dnslink subdomain), IPFS will resolve /ipns/mydomain.com to /ipfs/QmFile. However, this relies on the security of DNS (poor).`

But if I have a directory like /files and I need to change one file inside /files, I will need to update the dnslink, right? Even I will need to republish the IPNS every 12 hours

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [February 23, 2018, 5:25pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/9 "2018-02-23T17:25:48Z")

</div>

> But if I have a directory like /files and I need to change one file inside /files, I will need to update the dnslink, right?

Yes (although that can be automated).

> Even I will need to republish the IPNS every 12 hours.

dnslink doesn’t use IPNS (although it still uses the same namespace).

---

<div class="post-metadata">

**Author:** ![haggis](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@haggis](https://discuss.ipfs.tech/u/haggis)\
**Post date:** [August 30, 2018, 8:12pm UTC](https://discuss.ipfs.tech/t/ipns-max-lifetime/2130/10 "2018-08-30T20:12:45Z")

</div>

I also have a question regarding IPNS lifetime:

The IPNS will be republished every time a user uploads content through my node. What if nobody uploads anything for say 2 weeks.

1. Will the IPNS entry still be resolvable via `ipfs name resolve <my peer id>` **localy** so that I don’t need to store its target anywhere else?
2. If yes, does this also hold when the node gets restarted / updated?

Edit: I just observed it takes several seconds to publish IPNS. So that seems not to be the right approach if you want to add uploaded user files concurrently all to the same directory.
