Skip to content

Instantly share code, notes, and snippets.

@arshbot
Created November 20, 2018 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arshbot/4cbb6cc45d748b391f41fd876b6fa687 to your computer and use it in GitHub Desktop.
Save arshbot/4cbb6cc45d748b391f41fd876b6fa687 to your computer and use it in GitHub Desktop.
LND Installation & Running instructions
Mac install & start instructions
1. $ brew install go
2. $ export PATH=$PATH:$(go env GOPATH)/bin
3. $ https://bitcoin.org/en/download
4. $ echo testnet=1 >> Library/Application\ Support/Bitcoin/bitcoin.conf
Start bitcoin-qt and wait for it to sync
5. $ go get -d github.com/lightningnetwork/lnd
6. $ cd $GOPATH/src/github.com/lightningnetwork/lnd
7. if $ echo $GOPATH is nothing
$ cd go/src/github.com/lightningnetwork/lnd
8. $ brew install dep
9. $ make && make install
10. lnd --bitcoin.active
--bitcoin.testnet
--debuglevel=debug
--bitcoin.node=bitcoind
--bitcoind.rpcuser=<REPLACEME>
--bitcoind.rpcpass=<REPLACEME>
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
--bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
Ubuntu install & start instructions
1. $ sudo apt-add-repository ppa:bitcoin/bitcoin
2. $ sudo apt-get update
3. $ sudo apt-get install bitcoind
4. $ bitcoind -verbose -printtoconsole
5. $ sudo snap install --classic go
6. $ sudo snap install --classic go
7. $ mkdir go
8. $ export GOPATH=$HOME/go
9. $ export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
10. $ apt-get install build-essential
11. $ go get -u github.com/golang/dep/cmd/dep
12. $ go get -d github.com/lightningnetwork/lnd
13. $ cd $GOPATH/src/github.com/lightningnetwork/lnd
14. $ make && make install
15. $ lnd --bitcoin.active
--bitcoin.testnet
--debuglevel=debug
--bitcoin.node=bitcoind
--bitcoind.rpcuser=REPLACEME
--bitcoind.rpcpass=REPLACEME
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
--bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
Creating a payment channel betweeen Bob and Sally
Bob:
Load the wallet by paying some tBTC to the generated address
1. lncli --network=testnet newaddress np2wkh
{
"address": "2NG94j2LnVMAuDgdwdyzNpkcYiLuCfF8QyQ"
}
Verify that your confirmed_balance has enough to transact with
2. lncli --network=testnet walletbalance
{
"total_balance": "1899823",
"confirmed_balance": "1899823",
"unconfirmed_balance": "0"
}
Connect and open a channel to Sally
3. lncli --network=testnet connect <sallys_identity_pubkey>@<ip>:9735
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment