lightningd(8) reads a configuration file called \fIconfig\fR, if it exists, when it starts up\&. The location of this file defaults to \fB\&.lightning\fR in the home directory, but can be overridden by the \fI\-\-lightning\-dir\fR option on the lightningd(8) command line\&.
.sp
Configuration file options are processsed first, then command line options: later options override earlier ones except \fIaddr\fR options which accumulate\&.
.sp
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\&.
.SH"OPTIONS"
.sp
General options:
.PP
\fBallow\-deprecated\-apis\fR=\fIBOOL\fR
.RS4
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\&.
.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
\fIautocleaninvoice\-cycle\fR
is non\-zero)\&.
.RE
.sp
Networking options:
.sp
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\(cqs seems like a public address\&.
.sp
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\&.
Set an IP address or UNIX domain socket to listen to, but do not announce\&. A UNIX domain socket is distingished from an IP address by beginning with a
\fI/\fR\&.
.sp
.ifn\{\
.RS4
.\}
.nf
An empty \*(AqIPADDRESS\*(Aq is a special value meaning bind to IPv4 and/or
IPv6 on all interfaces, \*(Aq0\&.0\&.0\&.0\*(Aq means bind to all IPv4
interfaces, \*(Aq::\*(Aq means \*(Aqbind to all IPv6 interfaces\*(Aq\&. \*(AqPORT\*(Aq is
not specified, 9735 is used\&.
.fi
.ifn\{\
.RE
.\}
.sp
.ifn\{\
.RS4
.\}
.nf
This option can be used multiple times to add more addresses, and
its use disables autolisten\&. If necessary, and \*(Aqalways\-use\-proxy\*(Aq
is not specified, a DNS lookup may be done to resolve \*(AqIPADDRESS\*(Aq\&.
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\&.
Set a Tor control password, which may be needed for
\fIautotor:\fR
to authenticate to the Tor control port\&.
.RE
.SH"BUGS"
.sp
You should report bugs on our github issues page, and maybe submit a fix to gain our eternal gratutide!
.SH"AUTHOR"
.sp
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\&.