LIGHTNING-RECOVERCHANNEL(7)
π lightning-recoverchannel(7) β the gen-z field guide
ok so picture this: it's lightning-recoverchannel(7), the manual page for the lightning-recoverchannel command, and it's literally the "my house burned down and I need my money back" of Core Lightning. no cap. let's get into it π«Ά
β¨ NAME β¨
recoverchannel β the command for recovering channels bundled in an array in the form of Static Backup (the original page spells it "bundeled" and honestly? iconic, we're keeping it π).
β¨ SYNOPSIS β¨
recoverchannel scb
πΈ DESCRIPTION πΈ
the recoverchannel RPC command tries to force the peer (the one you already had a channel with, bestie) to close that channel and then sweeps the on-chain funds. πΈ
β οΈ heads up: this method is not spontaneous β it depends on the peer cooperating, so please only use it in the case of severe data loss. it's giving emergency room, not casual tuesday.
the scb parameter is an array holding the minimum required info to reconnect and sweep funds. you can grab the scb for channels you already stored by using the RPC command staticbackup. iykyk β
scb(array of hexs) β the SCB of the channels, in an array:- (hex, optional)
π¦ RETURN VALUE π¦
on success, you get an object back containing:
stubs(array of strings):- (string, optional) β channel IDs of channels successfully inserted. slay π
π AUTHOR π
Aditya <aditya.sharma20111@gmail.com> is mainly responsible. main character energy fr.
π SEE ALSO π
lightning-getsharedsecret(7)
π RESOURCES π
main web site: https://github.com/ElementsProject/lightning
π₯ EXAMPLES π₯
Example 1
Request:
$ lightning-cli recoverchannel -k "scb"='["0000000000000001channelid0340000340000340000340000340000340000340000340000340000nodeid03030303030303030303030303030303030303030303030303030303030300017f000001034003400340034003400340034003400340034003400340034003400340034003400340034003400340034003400003401000", "0000000000000002channelid0340200340200340200340200340200340200340200340200340200nodeid03030303030303030303030303030303030303030303030303030303030300017f000001034203420342034203420342034203420342034203420342034203420342034203420342034203420342034203420003401000", "0000000000000003channelid0410000410000410000410000410000410000410000410000410000nodeid01010101010101010101010101010101010101010101010101010101010100017f000001041004100410041004100410041004100410041004100410041004100410041004100410041004100410041004100003401000", "0000000000000004channelid0120000120000120000120000120000120000120000120000120000nodeid01010101010101010101010101010101010101010101010101010101010100017f000001012001200120012001200120012001200120012001200120012001200120012001200120012001200120012001200003401000", "0000000000000005channelid1520015200152001520015200152001520015200152001520015200nodeid01010101010101010101010101010101010101010101010101010101010100017f000001015201520152015201520152015201520152015201520152015201520152015201520152015201520152015201520003401000", "0000000000000006channelid1240012400124001240012400124001240012400124001240012400nodeid02020202020202020202020202020202020202020202020202020202020200017f000001012401240124012401240124012401240124012401240124012401240124012401240124012401240124012401240003401000"]'
{
"id": "example:recoverchannel#1",
"method": "recoverchannel",
"params": {
"scb": [
"0000000000000001channelid0340000340000340000340000340000340000340000340000340000nodeid03030303030303030303030303030303030303030303030303030303030300017f000001034003400340034003400340034003400340034003400340034003400340034003400340034003400340034003400003401000",
"0000000000000002channelid0340200340200340200340200340200340200340200340200340200nodeid03030303030303030303030303030303030303030303030303030303030300017f000001034203420342034203420342034203420342034203420342034203420342034203420342034203420342034203420003401000",
"0000000000000003channelid0410000410000410000410000410000410000410000410000410000nodeid01010101010101010101010101010101010101010101010101010101010100017f000001041004100410041004100410041004100410041004100410041004100410041004100410041004100410041004100003401000",
"0000000000000004channelid0120000120000120000120000120000120000120000120000120000nodeid01010101010101010101010101010101010101010101010101010101010100017f000001012001200120012001200120012001200120012001200120012001200120012001200120012001200120012001200003401000",
"0000000000000005channelid1520015200152001520015200152001520015200152001520015200nodeid01010101010101010101010101010101010101010101010101010101010100017f000001015201520152015201520152015201520152015201520152015201520152015201520152015201520152015201520003401000",
"0000000000000006channelid1240012400124001240012400124001240012400124001240012400nodeid02020202020202020202020202020202020202020202020202020202020200017f000001012401240124012401240124012401240124012401240124012401240124012401240124012401240124012401240003401000"
]
}
}
Response:
{
"stubs": [
"09eb55872cd9039ecd08281af756e23b15aad4129fd6a9bcd71b472114ebf43a",
"21bd30cac60f477f2c4267220b1702a6ec5780db34f9934fa94b8c0508bf3357",
"222d999f537e32e9458c5db17a63e012dcced61340de06fda5bc30566270b0aa",
"7512083907c74ed3a045e9bf772b3d72948eb93daf84a1cee57108800451aaf2",
"a4a379248e49d207cc984646e632e1a31105a85708b9d6d961a5018fdd489f5a",
"f4e1de801de57374d5737da622611e3a1ad9f16d5df9c30fceecc11ce732eeeb"
]
}
that's the whole page babes, go sweep those funds π§π
this has been lightning-recoverchannel(7) from Core Lightning v26.06.9 β mwah, stay hydrated, back up your SCBs, and don't lose your channel state bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms