docs: update sample-lnd.conf

This commit adds additional documentation to the sample-lnd.conf, and
also ensures that users are able to drop it in without any issues. The
prior version left the namespace off several of the arguments, rendering
it unusable.

Fixes #462.
This commit is contained in:
Olaoluwa Osuntokun 2017-12-08 13:16:12 -08:00
parent 839ce0689e
commit 1fa9ac7077
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 132 additions and 106 deletions

View File

@ -1,171 +1,197 @@
[Application Options] [Application Options]
; The directory to store lnd's data within ; The directory that lnd stores all wallet, chain, and channel related data
datadir=~/.lnd/data ; within The default is ~/.lnd/data on POSIX OSes, $LOCALAPPDATA/Lnd/data on
; Windows, ~/Library/Application Support/Lnd/data on Mac OS, and $home/lnd/data
; on Plan9. Environment variables are expanded so they may be used. NOTE:
; Windows environment variables are typically %VARIABLE%, but they must be
; accessed with $VARIABLE here. Also, ~ is expanded to $LOCALAPPDATA on Windows.
; datadir=~/.lnd/data
; Path to TLS certificate for lnd's RPC and REST services ; The directory that logs are stored in. The logs are auto-rotated by default.
tlscertpath=~/.lnd/tls.cert ; Rotated logs are compressed in place.
; logdir=~/.lnd/logs
; Path to TLS private key for lnd's RPC and REST services ; Path to TLS certificate for lnd's RPC and REST services.
tlskeypath=~/.lnd/tls.key ; tlscertpath=~/.lnd/tls.cert
; Disable macaroon authentication ; Path to TLS private key for lnd's RPC and REST services.
no-macaroons=false ; tlskeypath=~/.lnd/tls.key
; Disable macaroon authentication. Macaroons are used are bearer credentials to
; authenticate all RPC access. If one wishes to opt out of macaroons, uncomment
; the line below.
; no-macaroons=true
; Path to write the admin macaroon for lnd's RPC and REST services if it ; Path to write the admin macaroon for lnd's RPC and REST services if it
; doesn't exist ; doesn't exist. This can be set if one wishes to store the admin macaroon in a
adminmacaroonpath=~/.lnd/admin.macaroon ; distinct location. By default, it is stored within lnd's main home directory.
; Applications that are able to read this file, gains admin macaroon access
; adminmacaroonpath=~/.lnd/admin.macaroon
; Path to write the read-only macaroon for lnd's RPC and REST services if it ; Path to write the read-only macaroon for lnd's RPC and REST services if it
; doesn't exist ; doesn't exist. This can be set if one wishes to store the read-only macaroon
readonlymacaroonpath=~/.lnd/readonly.macaroon ; in a distinct location. The read only macaroon allows users which can read
; the file to access RPC's which don't modify the state of the daemon.
; readonlymacaroonpath=~/.lnd/readonly.macaroon
; Directory to log output.
logdir=~/.lnd/logs
; Add an interface/port to listen for connections ; Specify the interfaces to listen on. One listen address per line.
; (default all interfaces port: 9735) ; All interfaces on default port (this is the default):
listen= ; listen=
; Only ipv4 localhost on port 999:
; listen=127.0.0.1:999
; Add an ip to the list of local addresses we claim to listen on to peers
; Adding an external IP will advertise your node to the network. This signals
; that your node is available to accept incoming channels. If you don't wish to
; advertise your node, this value doesn't need to be set.
;externalip= ;externalip=
; Logging level for all subsystems {trace, debug, info, warn, error, critical} -- ; Debug logging level.
; You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the ; Valid levels are {trace, debug, info, warn, error, critical}
; log level for individual subsystems -- Use show to list available subsystems ; You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set
debuglevel=info ; log level for individual subsystems. Use btcd --debuglevel=show to list
; available subsystems.
; debuglevel=info
; Write CPU profile to the specified file ; Write CPU profile to the specified file.
;cpuprofile= ;cpuprofile=
; Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536 ; Enable HTTP profiling on given port -- NOTE port must be between 1024 and
; 65536. The profile can be access at: http://localhost:<PORT>/debug/pprof/.
;profile= ;profile=
; The port to listen on for incoming p2p connections ; The port to listen on for incoming p2p connections. The default port is 9735.
peerport=9735 ; peerport=9735
; The port for the rpc server ; The port that the gRPC server will listen on.
rpcport=10009 ; rpcport=10009
; The port for the REST server ; The port that the HTTP REST proxy to the gRPC server will listen on.
restport=8080 ; restport=8080
; The maximum number of incoming pending channels permitted per peer. ; The maximum number of incoming pending channels permitted per peer.
maxpendingchannels=1 ; maxpendingchannels=1
; The default number of confirmations a channel must have before it's considered ; The default number of confirmations a channel must have before it's considered
; open. ; open. We'll require any incoming channel requests to wait this many
defaultchanconfs=1 ; confirmations before we consider the channel active.
; defaultchanconfs=3
; If true, then automatic network bootstrapping will not be attempted. ; If true, then automatic network bootstrapping will not be attempted. This
nobootstrap=false ; means that your node won't attempt to automatically seek out peers on the
; network.
; nobootstrap=1
; If set, wallet will be encrypted using the default passphrase. ; If set, your wallet will be encrypted with the default passphrase. This isn't
noencryptwallet=false ; recommend, as if an attacker gains access to your wallet file, they'll be able
; to decrypt it. This value is ONLY to be used in testing environments.
; noencryptwallet=1
[Bitcoin] [Bitcoin]
; If the chain should be active or not. ; If the Bitcoin chain should be active. Atm, only a single chain can be
active=false ; active.
bitcoin.active=1
; The directory to store the chains's data within. ; The host that your local btcd daemon is listening on. This MUST be set if
chaindir= ; neutrino mode isn't active.
; bitcoin.rpchost=localhost
; The daemon's rpc listening address. If a port is omitted, then the default port ; Username for RPC connections to btcd. This only needs to be set if neutrino
; for the selected chain parameters will be used. ; mode isn't active. By default, lnd will attempt to automatically obtain the
rpchost=localhost ; credentials, so this likely won't need to be set (other than for simnet mode).
; bitcoin.rpcuser=kek
; Username for RPC connections ; Password for RPC connections to btcd. This only needs to be set if neutrino
rpcuser= ; mode isn't active. By default, lnd will attempt to automatically obtain the
; credentials, so this likely won't need to be set (other than for simnet mode).
; bitcoin.rpcpass=kek
; Password for RPC connections ; File containing the daemon's certificate file. This only needs to be set if
rpcpass= ; the node isn't on the same host as lnd.
; bitcoin.rpccert=~/.btcd/rpc.cert
; File containing the daemon's certificate file
rpccert=~/.ltcd/rpc.cert
; The raw bytes of the daemon's PEM-encoded certificate chain which will be used ; The raw bytes of the daemon's PEM-encoded certificate chain which will be used
; to authenticate the RPC connection. ; to authenticate the RPC connection. This only needs to be set if the btcd
rawrpccert= ; node is on a remote host.
; bitcoin.rawrpccert=
; Use the test network ; Use Bitcoin's test network.
testnet=false ; bitcoin.testnet=1
;
; Use Bitcoin's simulation test network
bitcoin.simnet=1
; Use the simulation test network ; Use Bitcoin's regression test network
simnet=false ; bitcoin.regtest=false
; Use the regression test network
regtest=false
[Litecoin] [Litecoin]
; If the chain should be active or not. ; If the Litecoin chain should be active. Atm, only a single chain can be
active=false ; active.
; litecoin.active=1
; The directory to store the chains's data within. ; The host that your local ltcd daemon is listening on. This MUST be set if
;chaindir= ; neutrino mode isn't active.
; litecoin.rpchost=localhost
; The daemon's rpc listening address. If a port is omitted, then the default port ; Username for RPC connections to ltcd. This only needs to be set if neutrino
; for the selected chain parameters will be used. ; mode isn't active.
rpchost=localhost ; litecoin.rpcuser=
; Username for RPC connections ; Password for RPC connections to ltcd. This only needs to be set if neutrino
;rpcuser= ; mode isn't active.
; litecoin.rpcpass=
; Password for RPC connections ; File containing the daemon's certificate file. This only needs to be set if
;rpcpass= ; the node isn't on the same host as lnd.
; litecoin.rpccert=~/.btcd/rpc.cert
; File containing the daemon's certificate file
rpccert=~/.ltcd/rpc.cert
; The raw bytes of the daemon's PEM-encoded certificate chain which will be used ; The raw bytes of the daemon's PEM-encoded certificate chain which will be used
; to authenticate the RPC connection. ; to authenticate the RPC connection. This only needs to be set if the ltcd
;rawrpccert= ; node is on a remote host.
; litecoin.rawrpccert=
; Use the test network ; Use Bitcoin's test network.
testnet=false ; litecoin.testnet=1
;
; Use Bitcoin's simulation test network
litecoin.simnet=1
; Use the simulation test network ; Use Bitcoin's regression test network
simnet=false ; litecoin.regtest=false
; Use the regression test network
regtest=false
[neutrino] [neutrino]
; If SPV mode should be active or not. ; If the light client mode should be active or not. This mode requires less
active=false ; disk space as it doesn't require one to have full-node locally. Instead,
; neutrino will connect to the P2P network for all of lnd's needs.
neutrino.active=false
; Add a peer to connect with at startup ; Connect only to the specified peers at startup. This creates a persistent
;addpeer= ; connection to a target peer. This is recommend as there aren't many neutrino
; compliant full nodes on the test network yet.
; Connect only to the specified peers at startup ;neutrino.connect=
;connect=
; Max number of inbound and outbound peers
;maxpeers=
; How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1
; second
;banduration=
; Maximum allowed ban score before disconnecting and banning misbehaving peers.
;banthreshold=
; Add a peer to connect with at startup.
;neutrino.addpeer=
[autopilot] [autopilot]
; If the autopilot agent should be active or not. ; If the autopilot agent should be active or not. The autopilot agent will
active=false ; attempt to automatically open up channels to put your node in an advantageous
; position within the network graph.
; autopilot.active=1
; The maximum number of channels that should be created ; The maximum number of channels that should be created.
maxchannels=5 ; autopilot.maxchannels=5
; The percentage of total funds that should be committed to automatic channel ; The percentage of total funds that should be committed to automatic channel
; establishment ; establishment
allocation=0.6 ; autopilot.allocation=0.6