LIGHTNING-SETCONFIG(7) LIGHTNING-SETCONFIG(7) NAME setconfig -- Dynamically change some config options SYNOPSIS setconfig config [val] [transient] DESCRIPTION Command added in v23.08. The setconfig RPC command allows you set the (dynamic) configuration option named by config: options which take a value (as separate from simple flag options) also need a val parameter. This new value will also be written at the end of the config.setconfig file (but see lightningd-config), for persistence across restarts (and any old value commented out if they were set in other config files). You can see what options are dynamically adjustable using lightning-list- configs(7). Note that you can also adjust existing options for stopped plu- gins; they will have an effect when the plugin is restarted. * config (string): Name of the config variable which should be set to the value of the variable. * val (one of, optional): Value of the config variable to be set or up- dated. For multi options, this must be an array of strings.: * (string) * (integer) * (boolean) * (array of strings): For multi options, an array of string values. * (string, optional) * transient (boolean, optional): If set, this change does NOT try to alter the configuration files, so the change will be reverted on any restart. The default is False. (added v25.02) RETURN VALUE On success, an object containing config is returned. It is an object con- taining: * config (string): Name of the config variable which was set. * dynamic (boolean) (always true): Whether this option is settable via setconfig. * source (string, optional): Source of configuration setting (file:linenum) for non-multi options. * sources (array of strings, optional): Sources of configuration settings (file:linenum) for multi options. (added v26.06): * (string, optional) * plugin (string, optional): The plugin this configuration setting is for. * set (boolean, optional): For simple flag options. * value_str (string, optional): For string options. * value_msat (msat, optional): For msat options. * value_int (integer, optional): For integer options. * value_bool (boolean, optional): For boolean options. * values_str (array of strings, optional): For multi-string options. (added v26.06): * (string, optional) ERRORS The following error codes may occur: * -32602: JSONRPC2_INVALID_PARAMS, i.e. the parameter is not dynamic, or the val was invalid. AUTHOR Rusty Russell rusty@rustcorp.com.au is mainly responsible for this feature. SEE ALSO lightningd-config(5), lightning-listconfigs(7) RESOURCES Main web site: https://github.com/ElementsProject/lightning EXAMPLES Example 1: Request: $ lightning-cli setconfig "autoclean-expiredinvoices-age" "300" { "id": "example:setconfig#1", "method": "setconfig", "params": [ "autoclean-expiredinvoices-age", 300 ] } Response: { "config": { "config": "autoclean-expiredinvoices-age", "value_int": 300, "source": "/tmp/.lightning/regtest/config.setconfig:2", "plugin": "/root/lightning/plugins/autoclean", "dynamic": true } } Example 2: Request: $ lightning-cli setconfig -k "config"="min-capacity-sat" "val"=500000 { "id": "example:setconfig#2", "method": "setconfig", "params": { "config": "min-capacity-sat", "val": 500000 } } Response: { "config": { "config": "min-capacity-sat", "value_int": 500000, "source": "/tmp/.lightning/regtest/config.setconfig:3", "dynamic": true } } Example 3: This shows setting a multi-value dynamic plugin option (requires a plugin that defines such an option). Request: $ lightning-cli setconfig -k "config"="my-multi-option" "val"='["value1", "value2"]' { "id": "example:setconfig#3", "method": "setconfig", "params": { "config": "my-multi-option", "val": [ "value1", "value2" ] } } Response: { "config": { "config": "my-multi-option", "values_str": [ "value1", "value2" ], "sources": [ "/tmp/.lightning/regtest/config.setconfig:4", "/tmp/.lightning/regtest/config.setconfig:5" ], "plugin": "/root/lightning/plugins/myplugin", "dynamic": true } } Core Lightning v26.06.1 LIGHTNING-SETCONFIG(7)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | AUTHOR | SEE ALSO | RESOURCES | EXAMPLES
Want to link to this manual page? Use this URL:
<https://man.FreeBSD.org/cgi/man.cgi?query=lightning-setconfig&sektion=7&manpath=FreeBSD+Ports+15.1.quarterly>