Linux command
lnd 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start the daemon
lnd
Start with a specific Bitcoin backend
lnd --bitcoin.active --bitcoin.mainnet --bitcoind.rpcuser=[user] --bitcoind.rpcpass=[pass]
Start on testnet
lnd --bitcoin.active --bitcoin.testnet
Specify a custom data directory
lnd --lnddir=[~/.lnd]
说明
lnd (Lightning Network Daemon) is a complete implementation of the Lightning Network protocol. It enables fast, low-cost Bitcoin transactions through payment channels, allowing near-instant payments without waiting for blockchain confirmations. The daemon manages payment channels, routes payments across the network, and maintains a local channel graph. It exposes gRPC and REST APIs for interaction, typically used via the companion lncli command-line client.
参数
- --bitcoin.active
- Enable Bitcoin as the active chain.
- --bitcoin.mainnet
- Use the Bitcoin main network.
- --bitcoin.testnet
- Use the Bitcoin test network.
- --bitcoind.rpcuser _USER_
- Username for bitcoind RPC authentication.
- --bitcoind.rpcpass _PASS_
- Password for bitcoind RPC authentication.
- --lnddir _DIR_
- Custom path to lnd's data directory.
- --listen _ADDR_
- Add an interface/port to listen for peer connections.
- --rpclisten _ADDR_
- Add an interface/port for the RPC server to listen on.
- --restlisten _ADDR_
- Add an interface/port for the REST server to listen on.
- --debuglevel _LEVEL_
- Logging level (trace, debug, info, warn, error, critical).
- --help, -h
- Show help.
- --version, -v
- Display version information.
FAQ
What is the lnd command used for?
lnd (Lightning Network Daemon) is a complete implementation of the Lightning Network protocol. It enables fast, low-cost Bitcoin transactions through payment channels, allowing near-instant payments without waiting for blockchain confirmations. The daemon manages payment channels, routes payments across the network, and maintains a local channel graph. It exposes gRPC and REST APIs for interaction, typically used via the companion lncli command-line client.
How do I run a basic lnd example?
Run `lnd` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --bitcoin.active do in lnd?
Enable Bitcoin as the active chain.