LIGHTNING-EXPOSESECRET(7)
π LIGHTNING-EXPOSESECRET π
okay so bestie, this is the manual page for lightning-exposesecret β the command that pulls out your hsm_secret file for backup. yeah. that one. π«Ά
β¨ NAME β¨
exposesecret β the command for extracting the hsm_secret file for backup. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
exposesecret passphrase [identifier]
π¦ DESCRIPTION π¦
so this command was added in v24.11, and it's the RPC command that lets you read the HSM secret. yes, the actual secret. no cap.
β οΈ heads up: it does not work with encrypted hsm secrets. like, at all. and it only operates if exposesecret-passphrase has been set in the configuration. no config, no vibes. π
here's the tea on the arguments:
passphrase(string) β the passphrase, which must match theexposesecret-passphraseconfiguration parameter. if it doesn't match, bestie, you're not getting in. πidentifier(string, optional) β a four-character, valid lowercase bech32 string (so not1,i,oorb) to use in the resulting BIP-93 output. if you don't specify it, it's generated from the node alias. iconic behaviour honestly. β¨
π RETURN VALUE π
on success, you get an object back, containing:
identifier(string) β the four-character identifier used in the codex32 output. it's redundant, but presented separately for clarity. lowkey thoughtful of them. π₯Ήcodex32(string) β the full codex32-encoded (i.e. BIP-93 encoded) HSM secret. the main character of the response, fr fr. πmnemonic(string, optional) β the BIP39 mnemonic phrase for the HSM secret (only present for mnemonic-based secrets). added v25.12 π§
π AUTHOR π
Rusty Russell rusty@rustcorp.com.au is mainly responsible. thank you king. π«‘π
β SEE ALSO β
π₯ RESOURCES π₯
main web site: https://github.com/ElementsProject/lightning β go click around, it's giving very much community. πΈ
π EXAMPLES π
example 1
request:
$ lightning-cli exposesecret -k "passphrase"="test_exposesecret"
{
"id": "example:exposesecret#1",
"method": "exposesecret",
"params": {
"passphrase": "test_exposesecret"
}
}
response:
{
"identifier": "luea",
"codex32": "cl10lueasd35kw6r5de5kueedxyesqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqanvrktzhlhusz"
}
example 2
request:
$ lightning-cli exposesecret "test_exposesecret" "cln2"
{
"id": "example:exposesecret#2",
"method": "exposesecret",
"params": [
"test_exposesecret",
"cln2"
]
}
response:
{
"identifier": "cln2",
"codex32": "cl10cln2sd35kw6r5de5kueedxyesqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn9lcvcu7cez4s"
}
example 3
request:
$ lightning-cli exposesecret -k "passphrase"="test_exposesecret"
{
"id": "example:exposesecret#3",
"method": "exposesecret",
"params": {
"passphrase": "test_exposesecret"
}
}
response:
{
"identifier": "peev",
"codex32": "cl10peevst6cqh0wu7p5ssjyf4z4ez42ks9jlt3zneju9uuypr2hddak6tlqsjhsks4laxts8q",
"mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
}
π₯ notice how example 3 is the only one with mnemonic? that's the mnemonic-based secret life. the other two are just built different. π
and that's the whole page bestie!! π this one's brought to you by Core Lightning v26.06.9 β yes that's the version, and LIGHTNING-EXPOSESECRET(7) is the page itself, so now you know all of it. go back up your secret responsibly and slay π
β¨π¦
π¦ 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