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\&.
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\&.
Default: 1000\&. The base fee to charge for every payment which passes through\&. Note that millisatoshis are a very, very small unit! Changing this value will only affect new channels and not existing ones\&. If you want to change fees for existing channels, use the RPC call lightningd\-setchannelfee(7)\&.
Default: 10 (0\&.001%)\&. 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%\&. Changing this value will only affect new channels and not existing ones\&. If you want to change fees for existing channels, use the RPC call lightningd\-setchannelfee(7)\&.
Default: 10000\&. This value defines the minimal effective channel capacity in satoshi to accept for channel opening requests\&. If a peer tries to open a channel smaller than this, the opening will be rejected\&.
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\&.
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\&.