lnd.conf
Configuration file for LND
lnd.conf
lnd/sample-lnd.conf at master · lightningnetwork/lnd
https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#creating-an-lndconf-optional
mac でのデフォルトのパス
lnd/docs/INSTALL.md at master · lightningnetwork/lnd
チャネルを開かせないようにしたい場合どうするか
--nolisten option
p2p connect を拒むので channel も作れない?
neutrino
alexbosworth/run-lnd: Rundown on running LND
Enable ‘Neutrino mode’ in Bitcoin Core - Builder's Guide
neutrino full node の切り替えはサポートしていない
https://github.com/lightningnetwork/lnd/blob/b34afa33f6993e4f24e481f83757751f0f8983de/sample-lnd.conf#L647-L650
run with local regtest bitcoind
code:example-lnd.conf
Application Options
datadir=~/lndk-example/lnd/data
tlscertpath=~/lndk-example/tls.cert
tlskeypath=~/lndk-example/tls.key
letsencryptdir=~/lndk-example/letsencrypt
Bitcoin
bitcoin.regtest=true
bitcoin.node=bitcoind
Bitcoind
; The base directory that contains the node's data, logs, configuration file,
; etc.
bitcoind.dir=~/lndk-example/bitcoind
bitcoind.config=~/lndk-example/bitcoind/bitcoin.conf
bitcoind.rpccookie=~/lndk-example/bitcoind/regtest/.cookie
bitcoind.rpcpolling=true
tlsextradomain
変更したら tls cert と key を削除して、LND を再起動。これにより追加のドメインに対応した cert などが作られる
datadir と tlscertpath, tlskeypath は独立しているので、datadir を指定しても datadir の中に tls.cert や tls.key が作られるわけではない
また起動時の lnd へのオプションとして --lnddir があるが、これは他の全ての directory 関連のオプションをオーバーライドしてしまうので注意
The base directory that contains lnd's data, logs, configuration file, etc. This option overwrites all other directory options.
lnd.conf の設定も上書きするかは不明
これをデフォルトとしつつも、細かいオプション追加したらそちらを優先してほしい。それが普通では?
lncli の --lnddir に lnd.conf があるディレクトリを指定すると lncli の動作も変わる気がする
macaroon は conf の datadir で指定したディレクトリの /data/chain 以下を探そうとするみたい
したがって、datadir の末尾は data で終わらないといけない?
cert はよくわからないが、lnd.conf と同じ階層に作っておくと lncli に tlscet のオプションを渡さなくてもうまく言っている気がする
rpc port を lnd.conf で変更している場合は、cli には --rpcserver option を渡す必要がある
--macaroonpath
txindex
昔は必須だったが、今はなくても動作はする
Remove txindex requirement for full nodes by wpaulino · Pull Request #751 · lightningnetwork/lnd
-damon のようなオプションはない、が以下のスクリプトで代用可能
$ lnd > /dev/null 2>&1 &
stdout, stderr を握りつぶし、プロセスはバックグラウンドで実行する
datadir を変更しても .lnd 配下に作られるデータがあるので注意
code:shell
ls -R .lnd/
.lnd/:
data letsencrypt logs tls.cert tls.key
.lnd/data:
watchtower
watchtower enable していなくてもディレクトリは作られる。 as of v0.18
$HOME に作る設定になっている模様
https://github.com/fort-nix/nix-bitcoin/blob/bff10a66e50f6a3387b3e5acbbdf2519c624e8bc/modules/lnd.nix#L290