<p>My first thought was that from a protocol perspective I don't see why any other node would send coins to your addresses after your node has been decomissioned. However two edge cases come to my mind:</p>
<ol>
<li>Offers could still be active. This should not matter as other nodes would have to fetch an invoice which they can't as your node is offline.</li>
<li>But Invoices may contain a fallback onchain address. So if you have outstanding unexpired invoices the nodes of other people might pay them through an onchain tx to your fallback address (potentially even after the expiry as that is only enforcable via economic incentives)</li>
</ol>
<p>Also your used onchain addresses are public and people could potentially associate them with your node id and stil manually send you coins. Keeping <code>hsmsecret</code> should be sufficient to derive your secret keys for your onchain adresses. Though I would not expect anyone sending coins there.</p>
<p>Also there may be non technical reasons why you may have to keep your data. But since this is a technical side I only mention the possibility.</p>

CC BY-SA 4.0
2023-01-30T07:17:54.940Z
2023-01-30T07:17:54.940Z
Rene Pickhardt
<p>Let's say I have a Lightning node, and want to shut it down. All its channels have been closed, and its onchain wallet has been drained.</p>
<p>Is there any reason why I'd want or need to keep some or part of its data directory around? If this were a Bitcoin onchain wallet, a possibility could always exist that someone would still send coins to an old address, and hence, I may want to keep around its key material forever.</p>
<p>My understanding is that this is not the case for a Lightning node, as all ways of receiving money involve interacting with my node. Is that correct, even when talking recent protocol improvements into account? If it matters, it's a Core Lightning node.</p>

<lightning-network><core-lightning>
Should I keep my Lightning node data around after decomissioning?
Pieter Wuille
# Should I keep my Lightning node data around after decomissioning?

(Asked by: username_0 on 2023-01-30)

Let's say I have a Lightning node, and want to shut it down. All its channels have been closed, and its onchain wallet has been drained.

Is there any reason why I'd want or need to keep some or part of its data directory around? If this were a Bitcoin onchain wallet, a possibility could always exist that someone would still send coins to an old address, and hence, I may want to keep around its key material forever.

My understanding is that this is not the case for a Lightning node, as all ways of receiving money involve interacting with my node. Is that correct, even when talking recent protocol improvements into account? If it matters, it's a Core Lightning node.

**Tags:** lightning-network, core-lightning


---

## 1 answers

### Answer by username_1 on 2023-01-30. Score: 7 | Accepted answer

My first thought was that from a protocol perspective I don't see why any other node would send coins to your addresses after your node has been decomissioned. However two edge cases come to my mind:

1. Offers could still be active. This should not matter as other nodes would have to fetch an invoice which they can't as your node is offline.
2. But Invoices may contain a fallback onchain address. So if you have outstanding unexpired invoices the nodes of other people might pay them through an onchain tx to your fallback address (potentially even after the expiry as that is only enforcable via economic incentives)

Also your used onchain addresses are public and people could potentially associate them with your node id and stil manually send you coins. Keeping `hsmsecret` should be sufficient to derive your secret keys for your onchain adresses. Though I would not expect anyone sending coins there.

Also there may be non technical reasons why you may have to keep your data. But since this is a technical side I only mention the possibility.


---

