Recovery of Funds from a Shockwallet Lightning Pub Node
Recovery of Funds from a Shockwallet Lightning Pub Node After Deleting the Linked App
Executive Summary
You operated a Shockwallet Lightning Pub node on a Linux guest, created a Lightning address (user1@shockwallet.app), and successfully assigned funds to that address. After deleting the “attached source” / linked app associated with the account, access to the funds was lost even though:
- The LND node still exists.
- You have a backup of the
.lnddirectory. - You have the 24‑word aezeed seed.
- The backup includes
wallet.dbandchannel.backup.
When restoring the backup data, the funds appear temporarily but disappear after the node refreshes or syncs.
This situation arises because Shockwallet + Lightning Pub uses an account abstraction layer on top of LND, where Lightning addresses and balances are mapped through a server-side account system rather than existing purely as native LND wallet funds. Deleting the linked app likely removed the Nostr Wallet Connect (NWC) authorization or account mapping used to control those funds.
However, the funds are very likely still recoverable, because:
- On-chain funds can be restored via aezeed seed recovery.
- Lightning channel funds can be reclaimed via Static Channel Backup (SCB) recovery.
- Even if the Lightning Pub account mapping is lost, the underlying LND wallet still controls the funds cryptographically.
Recovery requires reconstructing the node state or forcing channel closure so funds return on-chain.
1. Architecture of Shockwallet + Lightning Pub
Understanding what happened requires examining the architecture.
1.1 Core Components
The Shockwallet ecosystem typically consists of:
- LND node – the actual Lightning Network daemon holding keys and channels.
- Lightning Pub server – a multi-user access layer exposing the node to apps.
- Shock Wallet client (PWA/mobile) – connects using Nostr Wallet Connect (NWC).
- Lightning address mapping – e.g.
user1@shockwallet.app.
The Lightning address is not a native LND concept. It is an abstraction provided by Lightning Pub.
Instead of funds belonging directly to a simple LND wallet, Lightning Pub manages:
- user accounts
- routing logic
- invoice generation
- authorization via Nostr
Deleting the linked app / attached source effectively removed the authentication layer that gave you control over that Lightning Pub account.
But critically:
The Lightning Pub server still routes all funds through the underlying LND node.
So the cryptographic ownership still resides in:
wallet.db- the LND seed
- the channel commitments
2. Why the Balance Appears Then Disappears
You reported:
- Restoring the
.lndbackup initially shows funds. - After refresh/sync the balance becomes zero.
This pattern strongly suggests wallet rescan or channel state mismatch.
Possible mechanisms:
2.1 Address Discovery During Rescan
When LND restores from seed:
- It begins scanning the blockchain for derived addresses.
- If the derivation path differs from the original wallet state stored in
wallet.db, discovered UTXOs may not match expectations.
If the wallet state resets, previously detected outputs may disappear until rediscovered.
2.2 Lightning Channel State Loss
If channel.db is inconsistent or missing, LND may:
- forget active channels
- consider balances zero
- require SCB recovery.
2.3 Lightning Pub Accounting Layer
If funds were assigned internally to the Lightning Pub account, they may not appear in the LND wallet UI because they are:
- locked in channels
- pending HTLCs
- internal accounting entries.
3. Recovery Assets You Possess
You currently have all critical recovery components.
3.1 Aezeed Seed
The 24-word aezeed seed can recover:
- all on-chain Bitcoin funds
- funds from channels after force closure
This seed is the ultimate root of ownership.
3.2 wallet.db
wallet.db contains:
- address derivation state
- transaction metadata
- UTXO tracking
Using this file prevents costly blockchain rescans.
3.3 channel.backup
This is the Static Channel Backup (SCB).
The SCB contains encrypted information about:
- all open channels
- remote peer identities
- funding outpoints
However:
- it does not restore channels directly
- it instead requests peers to force-close them.
Funds are returned on-chain after CSV timelocks.
4. Most Likely Root Cause
Based on the symptoms, the most plausible explanation is:
Deletion of the Lightning Pub linked app removed the account mapping, not the funds.
The node still has:
- open Lightning channels
- on-chain UTXOs
But the UI account (user1@shockwallet.app) no longer maps to your authentication key.
Therefore:
- funds remain locked in channels
- the wallet interface cannot access them
This is an application-layer loss of control, not a cryptographic loss.
5. Recommended Recovery Strategy
The safest path is LND disaster recovery using SCB.
Step 1: Stop the Current Node
Ensure the node is not writing to the .lnd directory.
systemctl stop --user lnd
Step 2: Restore Clean Environment
Move the current directory aside:
mv ~/.lnd ~/.lnd_old
Restore your backup:
cp -r backup/.lnd ~/.lnd
Ensure the following exist:
.lnd/
data/
wallet.db
channel.backup
Step 3: Start LND with the Existing Wallet
Start LND normally.
If wallet unlock is required:
lncli unlock
Verify balances:
lncli walletbalance
lncli channelbalance
Step 4: Initiate Channel Backup Recovery
If channels are missing or inaccessible:
lncli restorechanbackup --multi_file ~/.lnd/data/chain/bitcoin/mainnet/channel.backup
This will:
- Contact channel peers
- Request force closure
- Broadcast closing transactions
Step 5: Wait for Timelocks
After force-close:
- Funds appear as pending outputs.
- They unlock after the CSV delay.
Typical delay:
- ~1440–2016 blocks
- ~10–14 days
Once unlocked, funds become normal on-chain UTXOs.
6. Advanced Recovery If Peers Are Unresponsive
In rare cases, peers may not cooperate.
Tools like chantools can extract recovery data.
Capabilities include:
- deriving sweep transactions
- extracting private keys
- reconstructing channel outputs
Example capabilities:
chantools sweepremoteclosed
chantools recoverloopin
chantools rescueclosed
This requires:
- aezeed
- channel.backup
- sometimes channel.db
This is advanced recovery but often succeeds even when SCB fails.
7. Alternative Path: Reconnect the Lightning Pub Account
Because your funds were associated with:
user1@shockwallet.app
Another recovery vector is:
Recreating the Lightning Pub account mapping
Possible methods:
- Reinstall Shockwallet.
- Reconnect using the same node.
- Re-import Nostr keys.
If the Lightning Pub server still has the account state, reconnecting may restore the interface.
However, if the account record was deleted, this path may not work.
8. Forensic Diagnostics You Should Run
Before performing destructive recovery, inspect the node.
Check on-chain wallet
lncli walletbalance
Check channel balances
lncli channelbalance
List channels
lncli listchannels
List pending channels
lncli pendingchannels
Check closed channels
lncli closedchannels
Inspect UTXOs
lncli listunspent
These commands will reveal whether funds are:
- on-chain
- locked in channels
- pending force-close
9. Critical Mistakes to Avoid
Do not:
1. Delete the seed-derived wallet
Your seed is the final recovery method.
2. Open new channels before recovery
This can complicate SCB restoration.
3. Overwrite channel.backup
This file updates automatically when channels change.
Keep the original copy safe.
4. Reinitialize the wallet with a different seed
That will permanently break channel recovery.
10. Probability of Recovery
Based on your assets:
| Asset | Status | Recovery Value |
|---|---|---|
| Aezeed | Present | Full on-chain recovery |
| wallet.db | Present | Accurate address state |
| channel.backup | Present | Lightning channel recovery |
Probability estimates:
- On-chain recovery: ~100%
- Lightning channel recovery via SCB: 90–99%
- Full channel state restoration: unlikely (SCB doesn’t support it)
But economic recovery of funds is highly likely.
11. Strategic Recommendation
The safest path:
- Preserve all backups.
- Restore
.lndin an isolated environment. - Use SCB recovery.
- Force-close channels.
- Sweep funds on-chain.
This bypasses the Lightning Pub account abstraction entirely and returns funds to a standard Bitcoin wallet.
12. Key Insight
The Lightning address (user1@shockwallet.app) is not the source of truth.
The real ownership layer is:
- the LND seed
- the channel funding outputs
- the commitment transactions.
As long as you possess the aezeed + SCB, the Lightning network protocol ensures that funds eventually return to your control.
13. If You Want a Precise Recovery Plan
To produce a deterministic recovery procedure, the following additional data would help:
- Output of
lncli listchannels - Output of
lncli pendingchannels - Output of
lncli walletbalance - Whether
channel.dbstill exists - Whether the node pubkey changed after restoration
With those, it is possible to determine the exact recovery path and expected transactions.
Bottom line: your funds are almost certainly not lost. The deletion removed the Shockwallet account interface, not the cryptographic control of the Lightning funds. Using LND seed recovery and Static Channel Backup restoration should reclaim them, most likely through channel force-closes returning funds to the on-chain wallet.
Sources
- https://darth-coin.github.io/nodes/private-ln-nodes-en.html
- https://fountain.fm/show/Mg1AWuvkeZSFhsJZ3BW2?ref=thrillerbitcoin.com
- https://creators.spotify.com/pod/profile/bitcoinreview/episodes/BR069---Cat-is-out-of-the-bag--OP_CAT-ft--NVK--Andrew-Poelstra--Rob-Hamilton--Rijndael-e2l5mm1
- https://serve.podhome.fm/rss/7cd0202b-463c-5b2e-b252-d4845cb71466
- https://community.umbrel.com/t/recovery-from-seed-no-balance/2789
- https://community.start9.com/t/imported-btc-lnd-from-umbrel-recover-seed-disappeared/844
- https://github.com/lightningnetwork/lnd/issues/4771
- https://docs.lightning.engineering/lightning-network-tools/lnd/disaster-recovery
- https://community.umbrel.com/t/no-balance-and-lightning-channel-recovery-after-node-reset/13491
- https://bitcoin.stackexchange.com/questions/99832/lightning-node-mynode-gone-missing-how-to-recover-funds
- https://docs.lightning.engineering/lightning-network-tools/lnd/recovery-planning-for-failure
- https://github.com/ElementsProject/lightning/issues/1170
- https://bitcoin.stackexchange.com/questions/90196/how-to-recover-funds-from-a-force-closed-lnd-lightning-channel
- https://github.com/lightningnetwork/lnd/issues/7974
- https://community.umbrel.com/t/the-guide-where-your-lightning-close-transaction-cant-get-the-channel-closed/15096?page=2
Looking for comments…
Searching Nostr relays. This may take a moment the first time this article is opened.
Looking for comments…
Searching Nostr relays. This may take a moment the first time this article is opened.