<p>From what I understand there are two types of backups. On-chain backups which store the keys of your on-chain funds that is on-chain channels and on-chain funds in the lightning implementation. This is the <code>hsm_secret</code> file in C-lightning. The other backup is the channel state which stores the commitment transaction state, the revocation keys etc. This is the <code>lightning.sqlite3</code> file in C-lightning.</p>

<p>If you lose your backup from <code>lightning.sqlite3</code> file, you have basically zero insight into what your current commitment state is within the active channels that you have. Your strategy should be to disconnect your node so that the other parties close the channels that they have with you unilaterally. However, since you have mentioned that your channel counterparty has also lost their backup, you cannot use this option.</p>

<p>Since both of you don't know what the current commitment state is and who is owed what amount, the best scenario that you have is to negotiate with your counterparty and make an on-chain transaction to close the channel. Since your and partner's <code>hsm_secret</code> file is safe you can make the on-chain transaction and recover the funds. You will need to derive the keys from the file but it will have to be done in a custom way as the implementations won't be able to handle this by itselves.</p>

<p>If you have lost your <code>hsm_secret</code> and <code>lightning.sqlite3</code> file then there is no way to recover the funds. Since you have basically lost the keys for the on-chain funds, you have But this is being in the same boat as losing the <code>wallet.dat</code> file in Bitcoin Core.</p>

CC BY-SA 4.0
2020-01-09T08:11:06.257Z
2020-01-09T08:23:47.077Z
2020-01-09T08:23:47.077Z
Ugam Kamat
<p>Tl;dr: also in lightning we have: not your keys, not your coins. </p>

<p>More detailed explanation:</p>

<p>I assume you mean with backup the private keys of the lightning node together with the history of the state data. </p>

<p>Then the same would happen as in the onchain case if you loose your keys. You could not move the coins anymore. Or in a onchain 2-2 multisig wallet (remember payment channels are just such a wallet together with some protocol how to spend from it) the same if you and the other person would loose their keys. None of you could move the btc anymore. </p>

<p>In lightning terminology this would mean that the channel stays open forever but no new states can be negotiated (meaning noone can route through that channel or use it to send / receive payments) and additionally the channel cannot be closed.</p>

<p>While this is a pity for you and your channel partner as in the onchain case it is also a pity for the network as other nodes still think the channel is active and will try to route payments over it.</p>

CC BY-SA 4.0
2020-01-09T08:01:48.710Z
2020-01-09T09:07:13.210Z
2020-01-09T09:07:13.210Z
Rene Pickhardt
<p>If none of the sides closes the channel, is the coin locked up forever?</p>

CC BY-SA 4.0
2020-01-10T20:47:05.743Z
I wish there would be something like "if no activity for n blocks auto-close". Maybe watchtowers could do it.
Sergey Aldoukhov
<lightning-network>
What happens with the bitcoin locked in the payment channel if both sides lose the backup?
Sergey Aldoukhov
# What happens with the bitcoin locked in the payment channel if both sides lose the backup?

(Asked by: username_0 on 2020-01-09)

If none of the sides closes the channel, is the coin locked up forever?

**Tags:** lightning-network

> **Comments:**
> **username_0**: I wish there would be something like "if no activity for n blocks auto-close". Maybe watchtowers could do it.  

---

## 2 answers

### Answer by username_2 on 2020-01-09. Score: 6 | Accepted answer

Tl;dr: also in lightning we have: not your keys, not your coins.

More detailed explanation:

I assume you mean with backup the private keys of the lightning node together with the history of the state data.

Then the same would happen as in the onchain case if you loose your keys. You could not move the coins anymore. Or in a onchain 2-2 multisig wallet (remember payment channels are just such a wallet together with some protocol how to spend from it) the same if you and the other person would loose their keys. None of you could move the btc anymore.

In lightning terminology this would mean that the channel stays open forever but no new states can be negotiated (meaning noone can route through that channel or use it to send / receive payments) and additionally the channel cannot be closed.

While this is a pity for you and your channel partner as in the onchain case it is also a pity for the network as other nodes still think the channel is active and will try to route payments over it.


---

### Answer by username_1 on 2020-01-09. Score: 2

From what I understand there are two types of backups. On-chain backups which store the keys of your on-chain funds that is on-chain channels and on-chain funds in the lightning implementation. This is the `hsm_secret` file in C-lightning. The other backup is the channel state which stores the commitment transaction state, the revocation keys etc. This is the `lightning.sqlite3` file in C-lightning.

If you lose your backup from `lightning.sqlite3` file, you have basically zero insight into what your current commitment state is within the active channels that you have. Your strategy should be to disconnect your node so that the other parties close the channels that they have with you unilaterally. However, since you have mentioned that your channel counterparty has also lost their backup, you cannot use this option.

Since both of you don't know what the current commitment state is and who is owed what amount, the best scenario that you have is to negotiate with your counterparty and make an on-chain transaction to close the channel. Since your and partner's `hsm_secret` file is safe you can make the on-chain transaction and recover the funds. You will need to derive the keys from the file but it will have to be done in a custom way as the implementations won't be able to handle this by itselves.

If you have lost your `hsm_secret` and `lightning.sqlite3` file then there is no way to recover the funds. Since you have basically lost the keys for the on-chain funds, you have But this is being in the same boat as losing the `wallet.dat` file in Bitcoin Core.


---

