lnd
is a database file (located in the data directory, for example ~/.lnd/data/chain/bitcoin/mainnet/wallet.db
on Linux) that contains all addresses and private keys for the on-chain and off-chain (LN) funds.bitcoind
, btcd
or neutrino
) and must therefore be created as the first step after starting up a fresh lnd
node.lnd
will not store that password anywhere by itself (as that would defeat the purpose of the password) so every time lnd
is restarted, its wallet needs to be unlocked with that password. This can either be done manually through the command line or (starting with lnd
version v0.13.0-beta
) automatically from a file.lnd
is being run for the first time, create a new wallet with:lnd
will then print a 24 word cipher seed mnemonic, which can be used to recover the wallet in case of data loss. The user should write this down and keep in a safe place.create
command. Please refer to the recovery guide for more information about recovering a node.lnd
starts up fresh (e.g. after a system restart or a version upgrade) the user-chosen wallet password needs to be entered to unlock (decrypt) the wallet database.lnd
's log with a message like this:lnd
is restarted.lnd
version v0.13.0-beta
and later there is a configuration option to tell the wallet to auto-unlock itself by reading the password from a file. This can only be activated after the wallet was created manually.lnd
without the flag:lnd
again:lnd
with the auto-unlock flag:wallet-unlock-password-file
option can also be added to lnd
's configuration file, for example:pass
as an example here but it should work similarly with other password managers.lnd
without the flag:lnd
again:pass
:lnd
, for example run-lnd.sh
:lnd
directly.lnd
, instead of using the unlock
command, the changepassword
command can be used:--noseedbackup
flag.--noseedbackup
flag should only ever be used in a test setup, for example on Bitcoin testnet, regtest or simnet.