When lightningd(8) starts up, it reads a configuration file\&. By default that is \fIconfig\fR in the \fB\&.lightning\fR subdirectory of the home directory (if it exists), but that can be changes by the \fI\-\-lightning\-dir\fR or \fI\-\-conf\fR options on the lightningd(8) command line\&.
Configuration file options are processed first, then command line options: later options override earlier ones except \fIaddr\fR options which accumulate\&.
All these options are mirrored as commandline arguments to lightningd(8), so \fI\-\-foo\fR becomes simply \fIfoo\fR in the configuration file, and \fI\-\-foo=bar\fR becomes \fIfoo=bar\fR in the configuration file\&.
.sp
Blank lines and lines beginning with \fI#\fR are ignored\&.
.SH"DEBUGGING"
.sp
\fI\-\-help\fR will show you the defaults for many options; they vary with network settings so you can specify \fI\-\-network\fR before \fI\-\-help\fR to see the defaults for that network\&.
.sp
The lightning\-listconfigs(7) command will output a valid configuration file using the current settings\&.
Enable deprecated options, JSONRPC commands, fields, etc\&. It defaults to
\fItrue\fR, but you should set it to
\fIfalse\fR
when testing to ensure that an upgrade won\(cqt break your configuration\&.
.RE
.PP
\fBhelp\fR
.RS4
Print help and exit\&. Not very useful inside a configuration file, but fun to put in other\(cqs config files while their computer is unattended\&.
.RE
.PP
\fBversion\fR
.RS4
Print version and exit\&. Also useless inside a configuration file, but putting this in someone\(cqs config file may convince them to read this man page\&.
.RE
.sp
Bitcoin control options:
.PP
\fBnetwork\fR=\fINETWORK\fR
.RS4
Select the network parameters (\fIbitcoin\fR,
\fItestnet\fR, or
\fIregtest\fR)\&.
.RE
.PP
\fBtestnet\fR
.RS4
Alias for
\fInetwork=testnet\fR\&.
.RE
.PP
\fBmainnet\fR
.RS4
Alias for
\fInetwork=bitcoin\fR\&.
.RE
.PP
\fBbitcoin\-cli\fR=\fIPATH\fR
.RS4
The name of
\fIbitcoin\-cli\fR
executable to run\&.
.RE
.PP
\fBbitcoin\-datadir\fR=\fIDIR\fR
.RS4
\fI\-datadir\fR
argument to supply to bitcoin\-cli(1)\&.
.RE
.PP
\fBbitcoin\-rpcuser\fR=\fIUSER\fR
.RS4
The RPC username for talking to bitcoind(1)\&.
.RE
.PP
\fBbitcoin\-rpcpassword\fR=\fIPASSWORD\fR
.RS4
The RPC password for talking to bitcoind(1)\&.
.RE
.PP
\fBbitcoin\-rpcconnect\fR=\fIHOST\fR
.RS4
The bitcoind(1) RPC host to connect to\&.
.RE
.PP
\fBbitcoin\-rpcport\fR=\fIPORT\fR
.RS4
The bitcoind(1) RPC port to connect to\&.
.RE
.PP
\fBrescan\fR=\fIBLOCKS\fR
.RS4
Number of blocks to rescan from the current head, or absolute blockheight if negative\&. This is only needed if something goes badly wrong\&.
Up to 32 UTF\-8 characters to tag your node\&. Completely silly, since anyone can call their node anything they want\&. The default is an NSA\-style codename derived from your public key, but "Peter Todd" and "VAULTERO" are good options, too\&.
.RE
.PP
\fBfee\-base\fR=\fIMILLISATOSHI\fR
.RS4
The base fee to charge for every payment which passes through\&. Note that millisatoshis are a very, very small unit!
This is the proportional fee to charge for every payment which passes through\&. As percentages are too coarse, it\(cqs in millionths, so 10000 is 1%, 1000 is 0\&.1%\&.
Allow nodes which establish channels to us to set any fee they want\&. This may result in a channel which cannot be closed, should fees increase, but make channels far more reliable since we never close it due to unreasonable fees\&.
How long to wait before sending commitment messages to the peer: in theory increasing this would reduce load, but your node would have to be extremely busy node for you to even notice\&.
How long we need to spot an outdated close attempt: on opening a channel we tell our peer that this is how long they\(cqll have to wait if they perform a unilateral close\&.
The longest our funds can be delayed (ie\&. the longest
\fBwatchtime\-blocks\fR
our peer can ask for, and also the longest HTLC timeout we will accept)\&. If our peer asks for longer, we\(cqll refuse to create a channel, and if an HTLC asks for longer, we\(cqll refuse it\&.
The number of blocks between incoming payments and outgoing payments: this needs to be enough to make sure that if we have to, we can close the outgoing payment before the incoming, or redeem the incoming once the outgoing is redeemed\&.
.RE
.PP
\fBcltv\-final\fR=\fIBLOCKS\fR
.RS4
The number of blocks to allow for payments we receive: if we have to, we might need to redeem this on\-chain, so this is the number of blocks we have to do that\&.
.RE
.sp
Invoice control options:
.PP
\fBautocleaninvoice\-cycle\fR=\fISECONDS\fR
.RS4
Perform cleanup of expired invoices every
\fISECONDS\fR
seconds, or disable if 0\&. Usually unpaid expired invoices are uninteresting, and just take up space in the database\&.
.RE
.PP
\fBautocleaninvoice\-expired\-by\fR=\fISECONDS\fR
.RS4
Control how long invoices must have been expired before they are cleaned (if
Note that for simple setups, the implicit \fIautolisten\fR option does the right thing: it will try to bind to port 9735 on IPv4 and IPv6, and will announce it to peers if it seems like a public address\&.
You can instead use \fIaddr\fR to override this (eg\&. to change the port), or precisely control where to bind and what to announce with the \fIbind\-addr\fR and \fIannounce\-addr\fR options\&. These will \fBdisable\fR the \fIautolisten\fR logic, so you must specifiy exactly what you want!
Set an IP address or UNIX domain socket to listen to, but do not announce\&. A UNIX domain socket is distinguished from an IP address by beginning with a
Do not bind to any ports, and do not try to reconnect to any peers\&. This can be useful for maintenance and forensics, so is usually specified on the command line\&. Overrides all
\fIaddr\fR
and
\fIbind\-addr\fR
options\&.
.RE
.PP
\fBautolisten\fR=\fIBOOL\fR
.RS4
By default, we bind (and maybe announce) on IPv4 and IPv6 interfaces if no
\fIaddr\fR,
\fIbind\-addr\fR
or
\fIannounce\-addr\fR
options are specified\&. Setting this to
\fIfalse\fR
disables that\&.
.RE
.PP
\fBproxy\fR=\fIIPADDRESS[:PORT]\fR
.RS4
Set a socks proxy to use to connect to Tor nodes (or for all connections if
\fBalways\-use\-proxy\fR
is set)\&.
.RE
.PP
\fBalways\-use\-proxy\fR=\fIBOOL\fR
.RS4
Always use the
\fBproxy\fR, even to connect to normal IP addresses (you can still connect to Unix domain sockets manually)\&. This also disables all DNS lookups, to avoid leaking information\&.
lightningd(8) supports plugins, which offer additional configuration options and JSON\-RPC methods, depending on the plugin\&. Some are supplied by default (usually located in \fBlibexec/c\-lightning/plugins\fR), but you can add your own, too\&.
.PP
\fBplugin\fR=\fIPATH\fR
.RS4
Specify a plugin to run as part of c\-lightning\&. This can be specified multiple times to add multiple plugins\&.
.RE
.PP
\fBplugin\-dir\fR=\fIDIRECTORY\fR
.RS4
Specify a directory to look for plugins; all files beginning with
\fIlplugin_\fR
in
\fIDIRECTORY\fR
are loaded\&.
\fIDIRECTORY\fR
must exist; this can be specified multiple times to add multiple directories\&.
.RE
.PP
\fBclear\-plugins\fR
.RS4
This option clears all
\fIplugin\fR
and
\fIplugin\-dir\fR
options preceeding it, including the default built\-in plugin directory\&. You can still add
\fIplugin\-dir\fR
and
\fIplugin\fR
options following this and they will have the normal effect\&.
.RE
.PP
\fBdisable\-plugin\fR=\fIPLUGIN\fR
.RS4
If
\fIPLUGIN\fR
contains a /, plugins with the same path as
\fIPLUGIN\fR
are disabled\&. Otherwise, any plugin with that base name is disabled, whatever directory it is in\&.
Rusty Russell <rusty@rustcorp\&.com\&.au> wrote this man page, and much of the configuration language, but many others did the hard work of actually implementing these options\&.
.SH"RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning
.SH"COPYING"
.sp
Note: the modules in the ccan/ directory have their own licenses, but the rest of the code is covered by the BSD\-style MIT license\&.