LIGHTNING-GRACEFUL(7)
π LIGHTNING-GRACEFUL(7) β the graceful bestie landing page π
okay so this is lightning-graceful, a page from the LIGHTNING-GRACEFUL(7) manual, and it's literally the "how to say bye to your node without being messy" guide β¨
πΈ NAME πΈ
graceful β the command that gets your Core Lightning node all cute and ready to stop, no chaos, no drama π
π¦ SYNOPSIS π¦
graceful [timeout]
β¨ DESCRIPTION β¨
okay so first things first: this command was added in v26.06 β she's new here, be nice π«Ά
graceful is an RPC command, and what it does is iconic: it stops any further htlcs from happening, and it disconnects all your idle peers. Basically it's telling everyone "party's over, go home" π
It returns when all HTLCs are complete, and all peers disconnected β and then you can shutdown. That's the whole vibe: graceful exit, no loose ends, main character energy π
It also sends notifications about HTLC expiry, so you can judge how long it is safe to be offline. Very considerate of her, honestly πΈ
Now, if you give it a timeout, it always returns after that many seconds: if any peer connections or HTLCs are still pending, those are returned to you. And an empty response means nothing is pending β that's the dream, bestie, that's the goal β
timeout(u32, optional) β if you set this, thegracefulcommand will return after this time even if not all HTLCs have terminated. Useful for scripting, where you may want to follow withstop. iykyk π₯
π RETURN VALUE π
On success, an object is returned, containing:
pending_htlcs_expiries... jk, it's actuallypending_htlc_expiries(array ofu32s, optional) β the (sorted) expiry blockheights of all HTLCs which are not resolved:- (
u32, optional)
- (
pending_peers(array ofpubkeys, optional) β any peers still connected (presumably because they have outstanding HTLCs):- (
pubkey, optional)
- (
π§ AUTHOR π§
Rusty Russell rusty@rustcorp.com.au is mainly responsible. we stan π
π SEE ALSO π
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
Example 1:
Request:
$ lightning-cli graceful
{
"id": "example:graceful#1",
"method": "graceful",
"params": {}
}
Response:
{}
(see that {}? that's the empty response β nothing pending β absolute slay π
β¨)
fr fr though: this one's a v26.06 baby, and the timeout version doesn't magically finish your HTLCs for you β it just hands you back whatever's still pending so your script can deal with it. no cap π
and that's the whole page, bestie π«Ά brought to you by Core Lightning v26.06.9 β LIGHTNING-GRACEFUL(7), catch you on the flip side πππ¦
π¦ 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