lightning-recover

lightning-recover -- Reinitialize Your Node for Recovery

SYNOPSIS

recover hsmsecret

DESCRIPTION

The recover RPC command wipes your node and restarts it with the --recover option. 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).

hsmsecret is either a codex32 secret starting with "cl1" as returned by hsmtool getcodexsecret, or a raw 64 character hex string.

NOTE: this command only currently works with the sqlite3 database backend.

  • hsmsecret (string): Either a codex32 secret starting with cl1 as returned by 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)

AUTHOR

Rusty Russell <[email protected]> is mainly responsible.

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"
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.