LIGHTNINGD-CONFIG(5)
πΈ NAME πΈ
lightningd-config (manual section 5) β the Lightning daemon configuration file. Yes bestie, itβs the config brain cell for lightningd π
β¨ SYNOPSIS β¨
~/.lightning/config
π DESCRIPTION π
Okay so when lightningd(8) starts up, it usually reads a general configuration file first β default $HOME/.lightning/config β and then a network-specific configuration file β default $HOME/.lightning/bitcoin/config. You can change this: see --conf and --lightning-dir.
Some configuration options are marked dynamic, and those can be changed at runtime: see lightning-setconfig(7). By default this will write to a file called config.setconfig in the network-specific lightning directory, unless there is another config file with a name ending in .setconfig.
General configuration files are processed first, then network-specific ones, then command line options. Later options override earlier ones β except addr options and log-level with subsystems, which accumulate instead. periodt β¨
include followed by a filename includes another configuration file at that point, relative to the current configuration file.
All these options are mirrored as commandline arguments to lightningd(8), so --foo becomes simply foo in the configuration file, and --foo=bar becomes foo=bar in the configuration file.
Blank lines and lines beginning with # are ignored.
π DEBUGGING π
--help will show you the defaults for many options; they vary with network settings, so you can specify --network before --help to see the defaults for that network.
The lightning-listconfigs(7) command will output a valid configuration file using the current settings. literally a config-file generator, slay π
π OPTIONS π
π§Έ General options π§Έ
developerβ This enables developer mode, allowing developer options and commands to be used. It also disables deprecated APIs; useallow-deprecated-apis=trueto re-enable them.allow-deprecated-apis=BOOLβ Enable deprecated options, JSONRPC commands, fields, etc. It defaults totrueoutside developer mode, but you should set it tofalsewhen testing to ensure that an upgrade wonβt break your configuration.helpβ Print help and exit. Not very useful inside a configuration file, but fun to put in otherβs config files while their computer is unattended. chaotic little icon behavior πversionβ Print version and exit. Also useless inside a configuration file, but putting this in someoneβs config file may convince them to read this man page.database-upgrade=BOOLβ Upgrades to Core Lightning often change the database: once this is done, downgrades are not generally possible. By default, Core Lightning will exit with an error rather than upgrade, unless this is an official released version. If you really want to upgrade to a non-release version, you can set this totrue(orfalseto never allow a non-reversible upgrade!).i-promise-to-fix-broken-api-user=FEATUREβ Deprecated features get removed slowly (over 3 releases), but sometimes people still get surprised when they are finally removed. As long as they havenβt been actually fully removed, this option will re-enable it. Unless weβve made a horrible mistake itβs probably time to complain or fix whatever is using the old API. It can be specified multiple times for different features.
π§Ό Whitespace Handling π§Ό
Because itβs a common error, we automatically trim whitespace from the end of most configuration options. Exceptions are noted below:
log-prefix: Preserves whitespace at the end.alias: Preserves whitespace at the end.
πͺ Bitcoin control options πͺ
Bitcoin control options: (yes, the source really says the heading twice β iconic in a chaotic way π)
network=NETWORKβ Select the network parameters (bitcoin,testnet,testnet4,signet, orregtest). This is not valid within the per-network configuration file.mainnetβ Alias fornetwork=bitcoin.regtestβ Alias fornetwork=regtest(added in v23.08).testnetβ Alias fornetwork=testnet.testnet4β Alias fornetwork=testnet4.signetβ Alias fornetwork=signet.bitcoin-cli=PATHβ [plugin bcli] The name ofbitcoin-cliexecutable to run.bitcoin-datadir=DIRβ [plugin bcli]-datadirargument to supply tobitcoin-cli(1).bitcoin-rpcuser=USERβ [plugin bcli] The RPC username for talking tobitcoind(1).bitcoin-rpcpassword=PASSWORDβ [plugin bcli] The RPC password for talking tobitcoind(1).bitcoin-rpcconnect=HOSTβ [plugin bcli] Thebitcoind(1)RPC host to connect to.bitcoin-rpcport=PORTβ [plugin bcli] Thebitcoind(1)RPC port to connect to.bitcoin-rpcclienttimeout=SECONDSβ [plugin bcli] Thebitcoind(1)RPC client timeout in seconds. Default is set to60instead of900to matchbitcoin-retry-timeoutdefault. When set explicitly, the higher value of it andbitcoin-retry-timeoutis used.bitcoin-retry-timeout=SECONDSβ [plugin bcli] Number of seconds to keep trying abitcoin-cli(1)command. If the command keeps failing after this time, exit with a fatal error.rescan=BLOCKSβ Number of blocks to rescan from the current head, or absolute blockheight if negative. This is only needed if something goes badly wrong.
β‘ Lightning daemon options β‘
lightning-dir=DIRβ Sets the working directory. All files (except--confand--lightning-diron the command line) are relative to this. This is only valid on the command-line, or in a configuration file specified by--conf.subdaemon=SUBDAEMON:PATHβ Specifies an alternate subdaemon binary. Current subdaemons arechanneld,closingd,connectd,gossipd,hsmd,onchaind, andopeningd. If the supplied path is relative the subdaemon binary is found in the working directory. This option may be specified multiple times.
So, subdaemon=hsmd:remote_signer would use a hypothetical remote signing proxy instead of the standard lightning_hsmd binary.
pid-file=PATHβ Specify pid file to write to.log-level=LEVEL[:SUBSYSTEM][:PATH]β What log level to print out: options areio,trace,debug,info,unusual,broken. If SUBSYSTEM is supplied, this sets the logging level for any subsystem (ornodeid) containing that string. If PATH is supplied, it means this log-level filter is only applied to that log-file, which is useful for creating logs to capture a specific subsystem. This option may be specified multiple times. Subsystems include:lightningd: The main lightning daemondatabase: The database subsystemwallet: The wallet subsystemgossipd: The gossip daemonplugin-manager: The plugin subsystemplugin-P: Each plugin, P = plugin path without directoryhsmd: The secret-holding daemonconnectd: The network connection daemonjsonrpc#FD: Each JSONRPC connection, FD = file descriptor number
The following subsystems exist for each channel, where N is an incrementing internal integer id assigned for the lifetime of the channel:
openingd-chan#N: Each opening / idling daemonchanneld-chan#N: Each channel management daemonclosingd-chan#N: Each closing negotiation daemononchaind-chan#N: Each onchain close handling daemon
So, log-level=debug:plugin would set debug level logging on all plugins and the plugin manager. log-level=io:chan#55 would set IO logging on channel number 55 (or 550, for that matter). log-level=debug:024b9a1fa8:/tmp/024b9a1fa8.debug.log would set debug logging for that channel only on the log-file=/tmp/024b9a1fa8.debug.log (or any node id containing that string).
log-prefix=PREFIXβ Prefix for all log lines: this can be customized if you want to merge logs with multiple daemons. Usually you want to include a space at the end of PREFIX, as the timestamp follows immediately.log-file=PATHβ Log to this file (instead of stdout). If you specify this more than once youβll get more than one log file:-is used to mean stdout. Sendinglightningd(8)SIGHUPwill cause it to reopen each file (useful for log rotation).log-timestamps=BOOLβ Set this tofalseto turn off timestamp prefixes (they will still appear in crash log files).rpc-file=PATHβ Set JSON-RPC socket (or/dev/tty), such as for$ lightning-cli(1).rpc-file-mode=MODEβ Set JSON-RPC socket file mode, as a 4-digit octal number. Default is0600, meaning only the user that launchedlightningdcan command it. Set to0660to allow users with the same group to access the RPC as well.daemonβ Run in the background, suppress stdout and stderr. Note that you need to specifylog-filefor this case.conf=PATHβ Sets configuration file, and disable reading the normal general and network ones. If this is a relative path, it is relative to the starting directory, notlightning-dir(unlike other paths).PATHmust exist and be readable (we allow missing files in the default case).
β οΈ Using this inside a configuration file is invalid.
wallet=DSNβ Identify the location of the wallet. This is a fully qualified data source name, including a scheme such assqlite3orpostgresfollowed by the connection parameters.
The default wallet corresponds to the following DSN:
--wallet=sqlite3://$HOME/.lightning/bitcoin/lightningd.sqlite31
For the sqlite3 scheme, you can specify a single backup database file by separating it with a : character, like so:
--wallet=sqlite3://$HOME/.lightning/bitcoin/lightningd.sqlite3:/backup/lightningd.sqlite3
The following is an example of a postgresql wallet DSN:
--wallet=postgres://user:pass@localhost:5432/db_name
This will connect to a DB server running on localhost port 5432, authenticate with username user and password pass, and then use the database db_name. The database must exist, but the schema will be managed automatically by lightningd.
hsm-passphraseβ If set, you will be prompted to enter a passphrase for your HSM secret. This option supports both legacy 32-bytehsm_secretfiles (where the passphrase encrypts the secret) and new BIP39 mnemonic-based secrets (where the passphrase is used as additional entropy during seed derivation according to the BIP39 standard).
Note that once you set a passphrase, this option will be mandatory for lightningd to start. If there is no HSM secret yet, lightningd will create a new mnemonic-based secret that will be secured with your passphrase following BIP39 specifications.
...
So like, if you're a legacy bestie and you already have an encrypted hsm_secret that you made with the deprecated encrypted-hsm option? It keeps working. Seamlessly. No drama, no migration arc, it just vibes. π
And for the new mnemonic-based secrets: your passphrase becomes part of the seed derivation process exactly as specified in BIP39, which is giving extra security factor, honestly. The mnemonic words alone are not sufficient to derive the seed without the passphrase. Periodt. π
If you've got an unencrypted legacy hsm_secret and you wanna encrypt it, or you just need to manage your HSM secrets generally, go see lightning-hsmtool(8). She'll sort you out. π«Ά
Note: this option replaces the deprecated encrypted-hsm option. Old one's retired, new one ate. π
grpc-host=HOST[plugin cln-grpc] β picks the GRPC server host. Default is127.0.0.1.grpc-port=portnum[plugin cln-grpc] β the port number the GRPC plugin listens on for incoming connections. Default is9736.grpc-msg-buffer-size=number[plugin cln-grpc] β the size of the buffer the GRPC plugin uses. This buffer stores notifications between receiving them fromlightningdand forwarding them over grpc. Heads up: if a buffer overflow happens, some notifications will not be delivered. π
πΈ Lightning node customization options πΈ
recover=mnemonicβ restores the node from a mnemonic. For pre-25.12 nodes (which didn't have a mnemonic), use a 32-byte secret encoded as either a codex32 secret string or a 64-character hex string.
This will fail if the hsm_secret file exists. Your node will start in offline mode, for manual recovery. The secret can be extracted from the hsm_secret using lightning-hsmtool(8)'s getsecret.
alias=NAMEβ up to 32 bytes of 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. πrgb=RRGGBBβ your favorite color, as a hex code. Main character aesthetic only. πfee-base=MILLISATOSHIβ 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 calllightning-setchannel(7).fee-per-satoshi=MILLIONTHSβ default:10(0.001%). This is the proportional fee to charge for every payment which passes through. As percentages are too coarse, it's in millionths, so10000is1%,1000is0.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 calllightning-setchannel(7).min-capacity-sat=SATOSHI[dynamic] β default:10000. This value defines the minimal effective channel capacity in satoshi to accept for channel opening requests. This will reject any opening of a channel which can't pass an HTLC of at least this value. Usually this prevents a peer opening a tiny channel, but it can also prevent a channel you open with a reasonable amount and the peer requesting such a large reserve that the capacity of the channel falls below this.ignore-fee-limits=BOOLβ allow nodes which establish channels to us to set any fee they want, up to a maximum of1000000perkw(4000sat/vB). This may result in a channel which cannot be closed, should fees increase, but makes channels far more reliable since we never close it due to unreasonable fees. Note that this can be set on a per-channel basis withlightning-setchannel(7).
Okay so lowkey this one is a lil scary β read the "channel which cannot be closed" part again, bestie. π
commit-time=MILLISECONDSβ 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 an extremely busy node for you to even notice.force-feerates==VALUESβ networks like regtest and testnet have unreliable fee estimates: we usually treat them as the minimum (253sats/kw) if we can't get them. This allows override of one or more of our standard feerates (seelightning-feerates(7)). Up to5values, separated by/can be provided: if fewer are provided, then the final value is used for the remainder. The values are in per-kw (roughly 1/4 of bitcoind's per-kb values), and the order is"opening","mutual_close","unilateral_close","delayed_to_us","htlc_resolution", and"penalty".
You would usually put this option in the per-chain config file, to avoid setting it on Bitcoin mainnet! e.g. ~rusty/.lightning/regtest/config.
htlc-minimum-msat=MILLISATOSHIβ default:0. Sets the minimal allowed HTLC value for newly created channels. If you want to change thehtlc_minimum_msatfor existing channels, use the RPC calllightning-setchannel(7).htlc-maximum-msat=MILLISATOSHIβ default: unset (no limit). Sets the maximum allowed HTLC value for newly created channels. If you want to change thehtlc_maximum_msatfor existing channels, use the RPC calllightning-setchannel(7).announce-addr-discovered=BOOLβ explicitly control the usage of discovered public IPs innode_announcementupdates. Default:'auto'β only if we don't have anything else to announce.
Note: you also need to open TCP port9735on your router towards your node. And note: this will always be disabled if you use'always-use-proxy'. π
announce-addr-discovered-port=PORTβ sets the public TCP port to use for announcing dynamically discovered IPs. If unset, this defaults to the selected network's lightning port, which is9735on mainnet.
π₯ Lightning channel and HTLC options π₯
large-channels(deprecated in v23.11) β as of v23.11, this is the default (and thus, the option is ignored). Previously, if you didn't specify this, channel sizes were limited to16777215satoshi.
Note: this option is spelled large-channels but it's pronounced wumbo. No cap. π£οΈ
watchtime-blocks=BLOCKSβ how long we need to spot an outdated close attempt: on opening a channel we tell our peer that this is how long they'll have to wait if they perform a unilateral close.(deprecated in v23.05) max-locktime-blocks=BLOCKSβ the longest our funds can be delayed (ie. the longestwatchtime-blocksour peer can ask for, and also the longest HTLC timeout we will accept). If our peer asks for longer, we'll refuse to create a channel, and if an HTLC asks for longer, we'll refuse it. She's deprecated but she's still iconic. βfunding-confirms=BLOCKSβ confirmations required for the funding transaction when the other side opens a channel before the channel is usable.commit-fee=PERCENTβ the percentage ofestimatesmartfee 2/CONSERVATIVEto use for the commitment transactions: default is100.commit-feerate-offset=INTEGERβ the additional feerate a channel opener adds to their preferred feerate to lessen the odds of a disconnect due to feerate disagreement (default5).max-concurrent-htlcs=INTEGERβ number of HTLCs one channel can handle concurrently in each direction. Should be between1and483(default30).max-dust-htlc-exposure-msat=MILLISATOSHIβ option which limits the total amount of sats to be allowed as dust on a channel.cltv-delta=BLOCKSβ 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.cltv-final=BLOCKSβ 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.accept-htlc-tlv-type=typesβ normally HTLC onions which contain unknown even fields are rejected. This option specifies that this type is to be accepted, and ignored. Can be specified multiple times. (Added in v23.08).min-emergency-msat=msatβ this is the amount of funds to keep in the wallet to close anchor channels (which don't carry their own transaction fees). It defaults to25000sat, and is only maintained if there are any anchor channels (or, when opening an anchor channel). This amount may be insufficient for multiple closes at once, however. π¬
π§ Cleanup control options π§
autoclean-cycle=SECONDS[plugin autoclean, dynamic] β perform search for things to clean everySECONDSseconds (default3600, or 1 hour, which is usually sufficient).autoclean-networkevents-age=SECONDS[plugin autoclean, dynamic] β how old network events (inlistnetworkevents) have to be before deletion (default 30 days, i.e.2592000seconds).autoclean-succeededforwards-age=SECONDS[plugin autoclean, dynamic] β how old successful forwards (settled inlistforwardsstatus) have to be before deletion (default0, meaning never).autoclean-failedforwards-age=SECONDS[plugin autoclean, dynamic] β how old failed forwards (failedorlocal_failedinlistforwardsstatus) have to be before deletion (default0, meaning never).autoclean-succeededpays-age=SECONDS[plugin autoclean, dynamic] β how old successful payments (completeinlistpaysstatus) have to be before deletion (default0, meaning never).autoclean-failedpays-age=SECONDS[plugin autoclean, dynamic] β how old failed payment attempts (failedinlistpaysstatus) have to be before deletion (default0, meaning never).autoclean-paidinvoices-age=SECONDS[plugin autoclean, dynamic] β how old invoices which were paid (paidinlistinvoicesstatus) have to be before deletion (default0, meaning never).autoclean-expiredinvoices-age=SECONDS[plugin autoclean, dynamic] β how old invoices which were not paid (and cannot be) (expiredinlistinvoicesstatus) before deletion (default0, meaning never). Yes, the original sentence is missing a "have to be"-ish clause, we're not fixing it, we're just telling you the deal. π
Note: prior to v22.11, forwards for channels which were closed were not easily distinguishable. As a result, autoclean may delete more than one of these at once, and then suffer failures when it fails to delete the others.
π Payment and invoice control options π
payment-fronting-node=nodeidβ always use this nodeid as the entry point when we generate invoices or offers: currently, the node must be a neighbor we have a channel with. For BOLT11 invoices we will use a routehint with the alias for the short channel id to provide limited privacy (we still reveal our node id). For BOLT12 invoices and offers, we provide a blinded path from the node to us which provides better privacy. This can be specified multiple times for multiple fronting nodes. Lowkey obsessed with that BOLT12 privacy glow-up. β¨disable-mpp[plugin pay]- Disable the multi-part payment sending support in the
payplugin. By default MPP support is enabled, but it can be desirable to disable it in situations in which each payment should result in a single HTLC being forwarded in the network. one payment, one HTLC, no splitting π invoices-onchain-fallbackβ adds a (taproot) fallback address to invoices produced by theinvoicecommand, so those invoices can also be paid onchain. dual-threat invoice, we love to see it β¨xpay-handle-pay=BOOL[plugin xpay, dynamic] β setting this makesxpayintercept simplepaycommands (defaultfalse). sneaky but iconic π«Άxpay-slow-mode=BOOL[plugin xpay, dynamic] β setting this makesxpaywait until all parts have failed/succeeded before returning. Usually this is unnecessary, asxpaywill return on the first success (we have the preimage, if they don't take all the parts that's their problem) or failure (the destination could succeed another part, but it would mean it was only partially paid). The default isfalse. ngl the parenthetical is a whole mood πxpay-user-layer=name[plugin xpay] β specify the name of a layerxpayshall use always for every payment. This is specially useful when combined withxpay-handle-paysince thelayersparameter is not available in thepayinterface. This can be specified multiple times to add more layers. stack 'em like scrunchies πaskrene-timeout=SECONDS[plugin askrene, dynamic] β this option makes thegetroutescall fail if it takes more than this many seconds. Setting it to zero is a fun way to ensure your node never makes payments. bestie that is a THREAT not a feature πaskrene-max-threads=NUMBER[plugin askrene, dynamic] β controls how many routesaskrenewill calculate at once: this is only useful on nodes which make multiple payments at once, and setting the number higher than your number of cores/CPUS will not help. The default is4. (CPUS. yes. we're keeping it. it's canon now π)bkpr-currency=name[plugin bookkeeper, dynamic] β the name is an ISO-4217 name (e.g.USD), which will be passed tocurrencyrateto fetch the exchange rate for that currency on each bookkeeper event. Setting name to the empty string is equivalent to not setting it. fiat girlies rise πΈbwatch-poll-interval=MILLISECONDS[plugin bwatch] β delay between polls for new blocks frombitcoind(default:30000). patience is a virtue ig βexperimental-bwatch[plugin bwatch] β enable the experimentalbwatchchain watcher. Without this, the plugin stays loaded but does not pollbitcoindor process watches. it's giving "I'm here but I'm not doing anything" energy π
π Networking options π
Okay so this is the part where your node decides where it lives on the internet, bestie. Listen up π«Ά
Note that for simple setups, the implicit autolisten option does the right thing: for the mainnet (bitcoin) network 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 (and other default ports for other networks, as described below). defaults carrying the whole team fr fr β¨
Core Lightning also support IPv4/6 address discovery behind NAT routers. If your node detects an new public address, it will update its announcement. For this to work you need to forward the default TCP port 9735 to your node. IP discovery is only active if no other addresses are announced. yes "an new". we're not touching it. it's vintage π
You can instead use addr to override this (eg. to change the port), or precisely control where to bind and what to announce with the bind-addr and announce-addr options. These will disable the autolisten logic, so you must specify exactly what you want! no take-backs, no training wheels, main character energy only π
addr=[IPADDRESS[:PORT]]|autotor:TORIPADDRESS[:SERVICEPORT][/torport=TORPORT]|statictor:TORIPADDRESS[:SERVICEPORT][/torport=TORPORT][/torblob=[blob]]|HOSTNAME[:PORT]β set an IP address (v4 or v6) or automatic Tor address to listen on and (maybe) announce as our node address.
An empty IPADDRESS is a special value meaning bind to IPv4 and/or IPv6 on all interfaces, 0.0.0.0 means bind to all IPv4 interfaces, :: means "bind to all IPv6 interfaces" (if you want to specify an IPv6 address and a port, use [] around the IPv6 address, like [::]:9750). If PORT is not specified, the default port 9735 is used for mainnet (testnet: 19735, signet: 39735, regtest: 19846, testnet4: 49735). If we can determine a public IP address from the resulting binding, the address is announced. write those numbers down, there WILL be a quiz π¦
If the argument begins with autotor: then it is followed by the IPv4 or IPv6 address of the Tor control port (default port 9051), and this will be used to configure a Tor hidden service for port 9735 in case of mainnet (bitcoin) network whereas other networks (testnet, testnet4, signet, regtest) will set the same default ports they use for non-Tor addresses (see above). The Tor hidden service will be configured to point to the first IPv4 or IPv6 address we bind to and is by default unique to your node's id.
If the argument begins with statictor: then it is followed by the IPv4 or IPv6 address of the Tor control port (default port 9051), and this will be used to configure a static Tor hidden service. You can add the text /torblob=BLOB followed by up to 64 Bytes of text to generate from this text a v3 onion service address text unique to the first 32 Byte of this text. You can also use an postfix /torport=TORPORT to select the external tor binding. The result is that over tor your node is accessible by a port defined by you and possibly different from your local node port assignment. 64 bytes in, first 32 bytes matter. the math is mathing π§
This option can be used multiple times to add more addresses, and its use disables autolisten. If necessary, and always-use-proxy is not specified, a DNS lookup may be done to resolve HOSTNAME or TORIPADDRESS.
If HOSTNAME was given that resolves to a local interface, the daemon will bind to that interface. it just knows where it belongs π
bind-addr=[ws:][IPADDRESS[:PORT]]|SOCKETPATH|HOSTNAME[:PORT]β 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/. quiet listener vibes π€«
An empty IPADDRESS is a special value meaning bind to IPv4 and/or IPv6 on all interfaces, 0.0.0.0 means bind to all IPv4 interfaces, :: means "bind to all IPv6 interfaces". PORT is not specified, 9735 is used.
The ws: prefix indicates to expect connections to use the RFC-6455 WebSocket protocol instead of raw TCP/IP. This is more usable by web browsers directly, but often requires a reverse proxy to speak TLS ("wss"). browser-friendly era π
This option can be used multiple times to add more addresses, and its use disables autolisten. If necessary, and always-use-proxy is not specified, a DNS lookup may be done to resolve IPADDRESS.
If a HOSTNAME was given and always-use-proxy is not specified, a DNS lookup may be done to resolve it and bind to a local interface (if found).
announce-addr=IPADDRESS[:PORT]|TORADDRESS.onion[:PORT]|dns:HOSTNAME[:PORT]β set an IP (v4 or v6) address or Tor address to announce; a Tor address is distinguished by ending in.onion.PORTdefaults to9735.
Empty or wildcard IPv4 and IPv6 addresses don't make sense here. Also, unlike the addr option, there is no checking that your announced addresses are public (e.g. not localhost). no safety net, bestie β you're on your own π
This option can be used multiple times to add more addresses, and its use disables autolisten.
Since v23.058, the dns: prefix can be used to indicate that this hostname and port should be announced as a DNS hostname entry. Please note that most mainnet nodes do not yet use, read or propagate this information correctly. v23.058. that's the version. that's what it says. we don't question the ancients π
announce-addr-dns=BOOL(deprecated in v23.08) β when set totrue(default isfalse), prefixes allHOSTNAMEinannounce-addrwithdns:. deprecated but still invited to the party π«Άofflineβ 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 alladdrandbind-addroptions. airplane mode but make it crypto βοΈautoconnect-seeker-peers=NUMBER(added in v24.11) β sets the number of peers to gossip with: if we don't have this many connections, we will try to connect to random peers until we do. The default is10. making friends by brute force, iconic πΈautolisten=BOOLβ by default, we bind (and maybe announce) on IPv4 and IPv6 interfaces if noaddr,bind-addrorannounce-addroptions are specified. Setting this tofalsedisables that. the default-default πproxy=IPADDRESS[:PORT]β set a socks proxy to use to connect to Tor nodes (or for all connections ifalways-use-proxyis set). The port defaults to9050if not specified.always-use-proxy=BOOLβ always use the proxy, 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. privacy queen behavior πdisable-dnsβ disable the DNS bootstrapping mechanism to find a node by its node ID.message-padding=BOOLβ if set totrue,connectdwill send extra bytes to peers to make messages uniform length. Some implementations don't accept these extra bytes, and our detection of them is not always reliable, so this option defaults tofalse. padding: great idea, chaotic execution πtor-service-password=PASSWORDβ set a Tor control password, which may be needed forautotor:to authenticate to the Tor control port. secret password, do not share π€«clnrest-port=PORT[plugin clnrest] β sets the REST server port to listen to (3010is common). If this is not specified, theclnrestplugin will be disabled. no port, no plugin. harsh but fair πclnrest-protocol=PROTOCOL[plugin clnrest] β specifies the REST server protocol. Default isHTTPS.clnrest-host=HOST[plugin clnrest] β defines the REST server host. Default is127.0.0.1. localhost said "this is my house" πclnrest-certs=PATH[plugin clnrest] β defines the path for HTTPS cert & key. Default path is same as RPC file path to utilize gRPC's client certificate. If it is missing at the configured location, new identity (client.pemandclient-key.pem) will be generated. new identity, who dis πclnrest-cors-origins=CORSORIGINS[plugin clnrest] β define multiple origins which are allowed to share resources on web pages to a domain different from the one that served the web page. Default is*which allows all origins. everyone's invited, apparently πclnrest-csp=CSPOLICY[plugin clnrest] β creates a whitelist of trusted content sources that can run on a webpage and helps mitigate the risk of attacks. Default CSP isdefault-src 'self'; font-src 'self'; img-src 'self' data:; frame-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline';. copy that string EXACTLY, semicolons and all, or it won't slay πclnrest-swagger-root=URL[plugin clnrest] β root url for Swagger UI. Default is/. swagger stays swaggering β¨wss-bind-addr=[IPADDRESS[:PORT]]|SOCKETPATH|HOSTNAME[:PORT][plugin wss-proxy] β sets the WSS address. This option can be used multiple times to add more addresses. more addresses, more problems, more vibes π¦wss-certs=PATH[plugin wss-proxy]- (carrying on from the WSS one above π«Ά) β sets the path for the WSS cert & key. Default path is the same as the RPC file path, so it can use gRPC/clnrest's client certificate. If it's not there at the configured location, a whole new identity gets generated for you:
client.pemandclient-key.pem. β¨ exposesecret-passphrase=passphrase[plugin exposesecret] β defines a passphrase that lets users extract thehsm_secretusing theexposesecretcommand. If you don't set this, theexposesecretcommand always fails. no cap, it's just never gonna work πcurrencyrate-add-source=NAME,URL,MEMBER[plugin cln-currencyrate] β adds a price source for the cln-currencyrate plugin. The form isNAME,URL,MEMBERS, whereURLandMEMBERScan both contain{currency}and{currency_lc}β those get substituted with the upper-case and lower-case currency names respectively, bestie.MEMBERSis how you deconstruct the result: for example, if the result looks like{"USD": {"last_trade": 12456.79}}thenMEMBERSwould beUSD,last_trade. And if you need to deconstruct an array, specify its position with its index, starting at0. (added in v26.04) πΈ
The default sources are, and yes these are all of them:
- coingecko:
https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs%5C_currencies=%7Bcurrency%5C_lc%7D - kraken:
https://api.kraken.com/0/public/Ticker?pair=XXBTZ%7Bcurrency%7D - blockchain:
https://blockchain.info/ticker - bitstamp:
https://www.bitstamp.net/api/v2/ticker/btc%7Bcurrency%5C_lc%7D - coindesk:
https://data-api.coindesk.com/index/cc/v1/latest/tic - coinbase:
https://api.coinbase.com/v2/prices/BTC-%7Bcurrency%7D/spot - binance:
https://data-api.binance.vision/api/v3/ticker/price?symbol=BTC%7Bcurrency%7D
currencyrate-disable-source=NAME[plugin cln-currencyrate] β disables the cln-currencyrate source with this name. that's it, that's the whole vibe π¦ (added in v26.04)
π Lightning Plugins π
so lightningd(8) supports plugins, and they're lowkey iconic: they hand you extra configuration options and JSON-RPC methods, all depending on which plugin it is. Some come supplied by default (usually chillin' in libexec/c-lightning/plugins/). And if a plugins directory exists under lightning-dir, that gets searched for plugins too, along with any immediate subdirectories. You can also point at extra paths yourself:
plugin=PATHβ specify a plugin to run as part of Core Lightning. You can drop this multiple times to add multiple plugins. π Note that unless the plugins themselves specify ordering requirements for being called on various hooks, plugins get ordered by commandline first, then config file.plugin-dir=DIRECTORYβ specify a directory to look for plugins in; every executable file that doesn't contain punctuation (other than.,-or_) inDIRECTORYgets loaded.DIRECTORYmust exist, and yeah, this can be specified multiple times to add multiple directories. The ordering of plugins within a directory is currently unspecified β chaos, honestly πclear-pluginsβ this one wipes allplugin,important-plugin, andplugin-diroptions that came before it, including the default built-in plugin directory. You can still addplugin-dir,plugin, andimportant-pluginoptions after it and they'll work totally normally. clean slate energy β¨disable-plugin=PLUGINβ ifPLUGINcontains a/, then plugins with the same path asPLUGINwon't be loaded at startup. Otherwise, no plugin with that base name gets loaded at startup, whatever directory it's chillin' in. This option is genuinely useful for disabling a single plugin inside a directory. And you can still explicitly load plugins that you've disabled, usinglightning-plugin(7) start. sneaky, but allowed πimportant-plugin=PLUGINβ specify a plugin to run as part of Core Lightning. This can be specified multiple times to add multiple plugins. The plugins you set here are considered so important that if the plugin stops for any reason (including vialightning-plugin(7) stop), Core Lightning will also stop running. That's the whole point, bestie: you can monitor crashes of important plugins by simply monitoring whether Core Lightning terminates. π Built-in plugins that ship installed withlightningd(8)are automatically considered important. main character plugins only, fr fr.
π§ͺ Experimental Options π§ͺ
β οΈ Heads up: experimental options are subject to breakage between releases. They're out here for advanced users who wanna test proposed features. You've been warned π
fetchinvoice-noconnectβ specifying this preventsfetchinvoice,sendinvoiceand replying to invoice request from trying to connect directly to the offering node as a last resort.experimental-shutdown-wrong-fundingβ specifying this allows thewrong_fundingfield in_shutdown: if a remote node has opened a channel but claims it used the incorrect txid (and the channel hasn't been used at all yet), this lets them negotiate a clean shutdown with the txid they offer (#4421).experimental-dual-fundβ specifying this enables support for the dual funding protocol (bolt #851), letting both parties contribute funds to a channel. πΈ The decision about whether to add funds or not to a proposed channel is handled automatically by a plugin that implements the appropriate logic for your needs. The default behavior is to not contribute funds.experimental-splicingβ specifying this enables support for the splicing protocol (bolt #863), letting both parties dynamically adjust the size a channel. These changes can be built interactively using PSBT and combined with other channel actions including dual fund, additional channel splices, or generic transaction activity. The operations get bundled into a single transaction. The channel stays active while awaiting splice confirmation β however, you can only spend the smaller of the prior channel balance and the new one. π
π«Ά (deprecated in v26.04)
experimental-lsps-clientβ specifying this enables client-side support for the lsps protocol (blip #50). Core-Lightning only supports the lsps2 (blip #52) subprotocol describing the creation of just-in-time-channel (JIT-channels) between a LSP and this client. π¦experimental-lsps2-serviceβ specifying this enables a LSP JIT-Channel service according to the lsps protocol (blip #52). It requires a LSP-Policy plugin to be available and aexperimental-lsps2-promise-secretto be set.experimental-lsps2-promise-secret=promisesecretβ sets apromisesecretfor the LSP JIT-Channel service. It's a 64-character hex string that acts as the secret for promises according to (blip #52). It's required ifexperimental-lsps2-serviceis set. π
π BUGS π
You should report bugs on our github issues page, and maybe submit a fix to gain our eternal gratitude! (literally eternal. we will never stop being grateful π«Ά)
βοΈ AUTHOR βοΈ
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. team effort, slay π
π SEE ALSO π
lightning-listconfigs(7) lightning-setchannel(7) lightningd(8) lightning-hsmtool(8)
π RESOURCES π
Main web site: https://github.com/ElementsProject/lightning
π COPYING π
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.
and that's the whole page, bestie!! π This masterpiece is from Core Lightning v26.06.9 and if you ever need to cite it, the fancy official name is LIGHTNINGD-CONFIG(5). go forth and configure responsibly π
β¨
π¦ 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