LIGHTNING-DISCONNECT(7)
π LIGHTNING-DISCONNECT β the disconnect command, bestie
okay so this is the manual page for lightning-disconnect, from the Core Lightning set of docs (LIGHTNING-DISCONNECT(7) if you're being formal about it). It's short, it's sweet, and it's literally just "hey, go away" for the Lightning Network. Let's get into it π«Ά
β¨ NAME β¨
disconnect β the command for disconnecting from another lightning node. That's it. That's the whole vibe. Bye bestie π
π SYNOPSIS π
disconnect id [force]
πΈ DESCRIPTION πΈ
The disconnect RPC command closes an existing connection to a peer β identified by id β in the Lightning Network, as long as that peer doesn't have an active channel. It's giving "we need to talkβ¦ actually no we don't" energy π
id(pubkey) β the public key of the peer whose connection you're terminating. You can find it aspeer_idin the output of thelistpeerchannelscommand. That's your golden ticket, iykyk π«force(boolean, optional) β if you set this toTrue, it will disconnect even with an active channel. So like, the channel's still there, but the connection? Gone. Use with intention, bestie π
π RETURN VALUE π
On success, an empty object is returned.
{}
Iconic. Minimalist. Nothing to say, and it said it β¨
β ERRORS β
So if things go sideways (π), the returned object will contain code and message properties, and that code is gonna be one of these:
-32602β if the given parameters are wrong. Check yourid, check yourforce, do the vibe check π-1β catchall nonspecific error. The "something happened but honestly who knows" of error codes π
π AUTHOR π
Michael Hawkins <michael.hawkins@protonmail.com>. Shoutout to the main character who wrote this π«Ά
π¦ SEE ALSO π¦
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
Go look, it's got the whole collection of docs and code, no cap π₯
π EXAMPLES π
Example 1: the gentle disconnect (no force, we're being polite)
Request:
$ lightning-cli disconnect -k "id"="nodeid040404040404040404040404040404040404040404040404040404040404" "force"=False
{
"id": "example:disconnect#1",
"method": "disconnect",
"params": {
"id": "nodeid040404040404040404040404040404040404040404040404040404040404",
"force": false
}
}
Response:
{}
Ate. Clean exit, no mess β¨
Example 2: the forceful disconnect (yes, even with a channel, don't come at me)
Request:
$ lightning-cli disconnect -k "id"="nodeid050505050505050505050505050505050505050505050505050505050505" "force"=True
{
"id": "example:disconnect#2",
"method": "disconnect",
"params": {
"id": "nodeid050505050505050505050505050505050505050505050505050505050505",
"force": true
}
}
Response:
{}
Again with the empty object. It really said "no thoughts, head empty" and honestly? Same π
quick reminder bestie:forceTruemeans it'll disconnect even with an active channel. That's the spicy one. Don't @ me if you didn't read it π
and that's the whole page, babe π stay connected (or don't, your call), and remember β this was the docs for lightning-disconnect, shipped as part of Core Lightning v26.06.9, in the LIGHTNING-DISCONNECT(7) manual. now go forth and disconnect responsibly π¦β¨
π¦ 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