pull down to refresh

A Lightning node can look fine for months and still be one failed disk away from a force-close — or from a penalty transaction that takes the channel. Most of that pain is avoidable. These are the mistakes that keep showing up.

1. Treating the seed as a full backup

Your seed (LND's aezeed, or Core Lightning's hsm_secret) recovers the on-chain wallet. It does not, by itself, recover funds that sit in open channels.

For that you also need a static channel backup: LND's channel.backup (SCB), or Core Lightning's emergency.recover file. Keep both, and treat them as a pair. A seed-only restore gives you a new empty node and no handle on the channels you already opened.

2. Restoring an old channel database

This is the expensive one. Each Lightning payment updates the channel state and revokes the previous commitment. If you copy back an outdated LND channel.db or Core Lightning database and the node broadcasts an old commitment, your peer can use the revocation secret and sweep the channel with a penalty transaction. That kind of backup is called toxic for a reason.

Do not resume a node from a stale database snapshot. Do not run two copies of the same node online at once. If the machine is gone, recover with SCB or emergency.recover. Those files are static: they let you start a Data Loss Protection recovery or a force-close, and they do not replay a revoked state.

If you snapshot the database at all, stop the node cleanly first — and understand that the snapshot is only safe until the next channel update.

3. Leaving the channel backup stale

channel.backup and emergency.recover change when you open or close channels. A copy from last month will not know about the channels you opened last week. Payments inside already-backed-up channels are a different matter: the static file does not need to follow every state update, which is why it is safe to restore.

Automate the copy. LND already rewrites channel.backup on change; hook a small script, inotify, or a gRPC subscription (SubscribeChannelBackups) so every new file leaves the box immediately. Put Core Lightning's emergency.recover in the same loop.

4. Storing the only copy on the node

A burned SSD, a failed SD card, a stolen Raspberry Pi: if the seed and the channel backup lived only on that device, the backup did not exist. Keep an encrypted copy off-site, on a different machine or medium, and preferably in more than one place.

5. Shipping backups in the clear

An unencrypted channel.backup leaking from a cloud folder is a privacy problem: it identifies your channels. The seed or hsm_secret in the clear is a theft problem. Encrypt the files before they leave the node (age, GPG, or another tool you can still decrypt under stress). Test that you can decrypt them, not just that the upload succeeded.

6. Skipping a watchtower

Static backups help after your disk dies. They do not watch the chain while you are offline. If a counterparty broadcasts a revoked state and you are down for longer than to_self_delay, you can miss the justice window.

Run a watchtower client — LND's built-in wtclient is the usual path — against a tower you trust, or one you operate yourself. A watchtower does not replace SCB. It covers a different failure: you are offline, and someone cheats.

7. Never rehearsing a restore

A backup you have never opened is a hope, not a plan. On testnet or signet, walk the whole path: new node, seed, SCB or emergency.recover, the recovery command (lncli restorechanbackup or lightning-cli emergencyrecover), and a force-close with the delay that follows. On mainnet, at least verify that the latest encrypted file decrypts and that LND or CLN will accept it. Write the exact steps down before you need them.

After a static-backup recovery you should expect force-closes, not a seamless resume of normal channel operation. Funds typically return only after the CSV delay, minus on-chain fees.

The full checklist and restore runbook from Sats-Werkstatt, Bitcoin & Lightning Node Hardening and Backup Checklist, is available at https://zaps.cash/@sats-werkstatt (pay with Lightning, no account).

59 sats \ 3 replies \ @Lux 23 Nov

Does a channel peer know if I set up a watchtower?

reply

No, they don't know

reply
12 sats \ 1 reply \ @Lux 23 Nov

Thank you.

Did anyone ever loose funds because of not having a watchtower?

I mean, is this kinda security by obscurity?
The false broadcaster have a reputation to loose for a risky payout. The fact that he can't verify the wathctower and exploit the peer based on confirmed data makes this a very unlikely scenario.

reply
Did anyone ever loose funds because of not having a watchtower?

Probably, but we cannot tell from on-chain data alone. It just looks like a Lightning channel force close transaction. But there have been cases where a breach has been detected and punished. For example: https://mempool.space/tx/4c46277688814044fd5bbf12bc09b60b2e70d72ba6fe447057d726f8063aae04

The false broadcaster have a reputation to loose for a risky payout. The fact that he can't verify the wathctower and exploit the peer based on confirmed data makes this a very unlikely scenario.

Correct. The mere possibility that a watchtower could be running, might deter a potential attacker from attempting to broadcast an old channel state while its peer appears to be offline.

reply

Solid write-up. The stale-db trap catches even careful operators because it feels safe until the penalty hits.

reply