LIGHTNING-RECOVER(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… LIGHTNING-RECOVER(7) β€” the recover girlies' era

okay so bestie, welcome to lightning-recover(7), the manual page for the recover RPC. yes it's a whole thing, and yes i'm about to walk you through it like we're texting at 2am 🫢


✨ NAME ✨

recover β€” Reinitialize Your Node for Recovery πŸ’–

like, a full glow-up reset for your node. main character energy fr.


πŸŽ€ SYNOPSIS πŸŽ€

recover hsmsecret

one argument, that's it, slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the recover RPC command wipes your node and restarts it with the --recover option. yes, wipes. like, wipes. dramatic on purpose πŸ’€

this is only permitted if the node is unused: no channels, no bitcoin addresses issued (you can use check to see if recovery is possible). vibe check first, always.

for nodes created with v25.12 or later, hsmsecret MUST be the 12-word mnemonic. no cap, it's required.

for earlier nodes, hsmsecret is either a codex32 secret starting with "cl1" as returned by lightning-hsmtool getcodexsecret, or a raw 64 character hex string. vintage node, vintage secret, iykyk ✨

NOTE: this command only currently works with the sqlite3 database backend. not postgres, not your fave, only sqlite3. periodt. πŸ™ˆ
  • hsmsecret (string) β€” usually a 12-word mnemonic; but for old nodes either a codex32 secret starting with cl1 as returned by lightning-hsmtool getcodexsecret or a raw 64 character hex string. πŸ’œ

πŸ‘‘ RETURN VALUE πŸ‘‘

on success, an object is returned, containing:

  • result (string) (always "Recovery restart in progress") (added v24.05) β€” literally always that string. iconic consistency. ⭐

🌸 AUTHOR 🌸

Rusty Russell rusty@blockstream.com is mainly responsible. shoutout to the icon behind it all πŸ‘‘


🌈 SEE ALSO 🌈

lightning-hsmtool(7)


πŸ“ RESOURCES πŸ“

Main web site: https://github.com/ElementsProject/lightning


πŸ”₯ EXAMPLES πŸ”₯

Example 1

Request:

$ lightning-cli recover -k "hsmsecret"="6c696768746e696e672d36000000000000000000000000000000000000000000"

{
  "id": "example:recover#1",
  "method": "recover",
  "params": {
    "hsmsecret": "6c696768746e696e672d36000000000000000000000000000000000000000000"
  }
}

Response:

{
  "result": "Recovery restart in progress"
}

Example 2

Request:

$ lightning-cli recover -k "hsmsecret"="cl10leetsd35kw6r5de5kueedxyesqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqluplcg0lxenqd"

{
  "id": "example:recover#2",
  "method": "recover",
  "params": {
    "hsmsecret": "cl10leetsd35kw6r5de5kueedxyesqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqluplcg0lxenqd"
  }
}

Response:

{
  "result": "Recovery restart in progress"
}

and that's the whole page bestie!! this lil masterpiece ships with Core Lightning v26.06.9 β€” go forth and recover responsibly, mwah πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from