LIGHTNING-PLUGIN(7)
π plugin β managing your plugins with RPC, bestie β¨
okay so this is the LIGHTNING-PLUGIN(7) page and it is literally all about the plugin RPC command. buckle up π
πΈ SYNOPSIS πΈ
plugin subcommand [plugin|directory] [options] ...
π¦ DESCRIPTION π¦
The plugin RPC command is your remote control for dynamic plugins β meaning plugins that declared themselves 'dynamic' (in getmanifest). main character energy only π
subcommand(string) (one of"start","stop","rescan","startdir","list"): this is the vibe check β it decides what action gets taken:subcommand starttakes a path to an executable as its argument and starts it as a plugin. thepathmay be an absolute path or a path relative to the plugins directory (default~/.lightning/plugins). if the plugin is already running and the executable (checksum) has changed, the plugin is killed and restarted β except if it's an important (or builtin) plugin. if the plugin doesn't complete the'getmanifest'and'init'handshakes within 60 seconds, the command will timeout and kill the plugin π. additional options may be passed to the plugin, but that requires all parameters to be passed askeyword=valuepairs using the-k|--keywordoption β which is recommended. for example, this command starts the pluginhelloworld.py(present in the plugin directory) with the optiongreetingset to'A crazy':
$ lightning-cli -k plugin subcommand=start plugin=helloworld.py greeting='A crazy'
subcommand stoptakes a plugin executable path or name as its argument and stops the plugin. if the plugin subscribed to'shutdown', it may take up to 30 seconds before this command returns β³. if the plugin is important and dynamic, this will shutdown lightningd β yes, the whole daemon, no cap, be careful π.subcommand startdirstarts all executables it can find indirectory(excl. subdirectories) as plugins. checksum and timeout behavior as instartapplies.subcommand rescanstarts all plugins in the default plugins directory (default~/.lightning/plugins) that are not already running. checksum and timeout behavior as instartapplies.subcommand listlists all running plugins (incl. non-dynamic).
plugin(string, optional): path or name of a plugin executable to start or stop.directory(string, optional): path of a directory containing plugins.options(array of strings, optional):- (string, optional):
keyword=valueoptions passed to plugin, can be repeated.
- (string, optional):
β¨ RETURN VALUE β¨
on success, an object is returned, containing:
command(string) (one of"start","stop","rescan","startdir","list"): the subcommand this is responding to π«Ά
if command is "start", "startdir", "rescan" or "list":
plugins(array of objects):name(string): full pathname of the plugin.active(boolean): status; plugin completedinitand is operational, plugins are configured asynchronously.dynamic(boolean): plugin can be stopped or started without restarting lightningd.
if command is "stop":
result(string): a message saying it successfully stopped.
π ERRORS π
on error, the reason why the action could not be taken upon the plugin is returned. it's giving honest feedback π
π AUTHOR π
Antoine Poinsot darosior@protonmail.com is mainly responsible. stan him fr fr π
π SEE ALSO π
$ lightning-cli(1), lightning-listconfigs(7), writing plugins
β RESOURCES β
Main web site: https://github.com/ElementsProject/lightning
π₯ EXAMPLES π₯
π§ Example 1:
Request:
$ lightning-cli plugin -k "subcommand"="start" "plugin"="/root/lightning/tests/plugins/allow_even_msgs.py"
{
"id": "example:plugin#1",
"method": "plugin",
"params": {
"subcommand": "start",
"plugin": "/root/lightning/tests/plugins/allow_even_msgs.py"
}
}
Response:
{
"command": "start",
"plugins": [
{
"name": "/root/lightning/plugins/autoclean",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/chanbackup",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/bcli",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/commando",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/funder",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/topology",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/exposesecret",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/keysend",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/offers",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/pay",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/recklessrpc",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/recover",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/txprepare",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/cln-renepay",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/cln-xpay",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/spenderp",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/cln-askrene",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/sql",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/cln-grpc",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/cln-lsps-client",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/cln-bip353",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/bookkeeper",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/tests/plugins/allow_even_msgs.py",
"active": true,
"dynamic": true
}
]
}
π Example 2:
Request:
$ lightning-cli plugin -k "subcommand"="stop" "plugin"="/root/lightning/tests/plugins/allow_even_msgs.py"
{
"id": "example:plugin#2",
"method": "plugin",
"params": {
"subcommand": "stop",
"plugin": "/root/lightning/tests/plugins/allow_even_msgs.py"
}
}
Response:
{
"command": "stop",
"result": "Successfully stopped allow_even_msgs.py."
}
π Example 3:
Request:
$ lightning-cli plugin "list"
{
"id": "example:plugin#3",
"method": "plugin",
"params": [
"list"
]
}
Response:
{
"command": "list",
"plugins": [
{
"name": "/root/lightning/plugins/autoclean",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/chanbackup",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/bcli",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/commando",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/funder",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/topology",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/exposesecret",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/keysend",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/offers",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/pay",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/recklessrpc",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/recover",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/txprepare",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/cln-renepay",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/cln-xpay",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/spenderp",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/cln-askrene",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/sql",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/cln-grpc",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/cln-lsps-client",
"active": true,
"dynamic": false
},
{
"name": "/root/lightning/plugins/cln-bip353",
"active": true,
"dynamic": true
},
{
"name": "/root/lightning/plugins/bookkeeper",
"active": true,
"dynamic": false
}
]
}
and that's the whole page bestie!! π this one's from Core Lightning v26.06.9, the LIGHTNING-PLUGIN(7) manual β go forth and start/stop your plugins responsibly, mwah π«Άβ¨π
π¦ 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