Hi SN!
Yesterday, I realized I had some funds on my lightning node where my SSD broke a week ago. The funds weren't in channels.
I fortunately did backup hsm_secret and the sqlite3 database (I used CLN) so I should be able to recover my funds without any issues:
Recovery of the hsm_secret is sufficient to recover any onchain funds.
However, it seems like the common way is to run a new lightning node with the old hsm_secret.
But can I not go back from hsm_secret to BIP39? So I can open the wallet in Electrum for example?
No, for CLN is not possible that. Only for LND you can do that, restoring in Zap, Bluewallet or Blixt and even in Sparrow.
What you can do is to export privkeys from that hsm_secret file See more details here https://walletsrecovery.org/ https://github.com/rsbondi/clightning-go-plugin/tree/master/dump_keys
Also a very good toolkit is this one https://guggero.github.io/cryptography-toolkit/#!/
reply
Thanks! Will look into it and report back
reply
Hope you recover everything bro, I'm not knowledgeable of this stuff :(
reply
Thanks! But I'm pretty sure I'm fine, haha
Not finding my backup immediately was scary though ngl, lol
reply
check up on your backups people, every couple months, make sure its where you think it is.
reply
Recently SCB — Static Channel Backup got integrated into the master branch. So I went ahead and tried it out.
This is a guide to help you implement static channel backup and restore on your LND node.
If you are new to Lightning Network, check out my beginners guide to setting up a lightning node and configuring it to send and receive payments.
Before we get into details, let me quickly tell you what can you expect from SCB and it’s way of working.
reply
This is a guide to help you implement static channel backup and restore on your LND node.
Where is the guide?
reply
Here some guide
You have some channels open with local-balance committed. Without SCB you run a risk of losing these funds in case of a hard-drive failure. Well, then how does SCB protect against this loss of funds?
Enabling SCB automatically backs up your channel data whenever new channels are opened or old ones are closed. This is done by backing up the data into a file named channel.backup . Now, this file resides within the same machine which is not at all ideal, but we will address this later. Given that you have a channel.backup file and your seed, in case of data loss, you will restore the wallet using your seed, next you will use the CLI command restorechanbackup and pass the path to your channels.backup file. This should be enough to recover your on-chain and also the local funds committed into channels.
The channel backup file is encrypted using a key derived from your wallet seed.
reply