Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- the following guide is an updated install process from the following which needs some work updating still
- https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md
- It is specific to btcd, lnd, on testnet, running on an ubuntu 16.04 server host.
- It does not address mainnet, or using bitcoind, or nuetrino.
- INSTALL
- =======
- install golang
- sudo apt-get install golang-1.9-go
- mkdir go
- set go paths
- nano .profile
- add to the end
- export GOROOT=/usr/lib/go-1.9/
- export GOPATH=$HOME/go
- export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
- logout, log back in
- check variables with
- go env
- install glide
- go get -u github.com/Masterminds/glide
- install lnd
- git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
- cd $GOPATH/src/github.com/lightningnetwork/lnd
- glide install
- go install . ./cmd/...
- run tests
- go install; go test -v -p 1 $(go list ./... | grep -v '/vendor/')
- install btcd
- git clone https://github.com/roasbeef/btcd $GOPATH/src/github.com/roasbeef/btcd
- cd $GOPATH/src/github.com/roasbeef/btcd
- glide install
- go install . ./cmd/...
- setup a $HOME/.btcd/btcd.conf file from https://github.com/btcsuite/btcd/blob/master/sample-btcd.conf
- simplest version might be
- [Application Options]
- datadir=~/.btcd/data
- testnet=1
- externalip=YOURIP #replace with your IP address
- ;addpeer=KNOWNPEERIP #add a known peer if you want
- rpcuser=REPLACEME
- rpcpass=REPLACEME
- txindex=1
- ; debuglevel=info
- run btcd and sync (will take a long time)
- btcd --testnet --txindex --rpcuser=REPLACEME --rpcpass=REPLACEME
- monitor progress in another terminal window with
- btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getinfo
- btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more
- to run in the background (and tail log file)
- btcd --testnet --txindex --rpcuser=REPLACEME --rpcpass=REPLACEME >> btcd.log 2>&1 &
- view logs by going
- tail btcd.log
- [Please see EXTRA section at end, for supervisor configuration to run btcd automatically]
- create $HOME/.lnd/lnd.conf
- [Application Options]
- debuglevel=debug
- debughtlc=true
- maxpendingchannels=10
- noencryptwallet=true
- externalip=YOURIP
- [Bitcoin]
- bitcoin.active=1
- bitcoin.testnet=1
- [Btcd]
- btcd.rpcuser=<btcd rpc username>
- btcd.rpcpass=<btcd rpc password>
- [Neutrino]
- # neutrino.active=1
- neutrino.connect=faucet.lightning.community
- [Autopilot]
- # autopilot.active=1
- Once btcd has synced, run lnd using the btcd backend and lnd.conf config file create
- lnd --bitcoin.active --bitcoin.testnet
- to run in the background (and tail log file)
- lnd --bitcoin.active --bitcoin.testnet >> lnd.log 2>&1 &
- tail the log file
- tail lnd.log
- [Please see EXTRA section at end, for supervisor configuration to run automatically]
- To verify things are operational
- lncli getinfo
- lncli getnetworkinfo
- lncli describegraph
- Setup a wallet to get testnet coins from faucet (needs a np2wkh segwit format address)
- lncli newaddress np2wkh
- open https://testnet.manu.backend.hamburg/faucet and paste in the address you created and click 'give me some coins' multiple times
- After a few minutes your coins should have arrived. You can verify with
- lncli walletbalance
- Open a channel to one or more of the following, or another peer you know
- Yall.org: 02ecafd1d828301da58edacdd61232835940c91767a01b3bfba57240989f9df4da@45.77.115.33:9735
- Htlc.me: 02d28c3aac4b4f36746052a735831afbe65bc5698a7be5bd41b42fd1ddf2a1a358@45.63.87.131:9735
- Bitrefill: 0298d0c6987e2e64451c7f723e15aff4dfca92f0e3973d214e206257abb0d1dd55@lnd.bitrefill.com:9735
- lnd.fun: 02f057867392ba8e9fe2b62b8a21ee36be00a3338d5d34cb1a2ffab3d57d8a2aea@lnd.fun:9735
- Eclair: 03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134@endurance.acinq.co:9735
- LND Faucet: 02c39955c1579afe4824dc0ef4493fdf7f3660b158cf6d367d8570b9f19683afb5@159.203.125.125:9735
- lncast.com: 02139a5bc1f1c929c04530a99160f2072e2a731f14c666abf87479510912279c11@lncast.com:9735
- Slack Tipbot: 03ba998c7cfc9e48d59bf5350ebb54356b75ba9cce6a6284628eda6bf389ce452c@194.135.83.49:9735
- ctrlbreak_1: 03b0d54ece3b31934a96b8c425aa33759ee9acb876cc9b92bbfe8e1c19af6c11a2@47.55.95.227:9735
- Open a channel by first connection, then opening a channel as follows
- lncli connect pubkey@ip:port
- lncli openchannel --node_key=<pubkey> --local_amt=100000
- verify pending & open channels using
- lncli pendingchannels
- lncli listchannels
- EXTRA
- =====
- start btcd and lnd automatically using supervisor. First install supervisor
- sudo apt-get install supervisor
- Then add two configuration files as follows:
- cd /etc/supervisor/conf.d
- nano btcd.conf
- [program:btcd]
- user=REPLACE-WITH-YOUR-USERNAME
- command=/home/YOUR-HOME-DIR/go/bin/btcd --testnet --txindex --rpcuser=REPLACEME --rpcpass=REPLACEME
- stdout_logfile = /home/YOUR-HOME-DIR/btcd.log
- stderr_logfile = /home/YOUR-HOME-DIR/btcd.log
- startretries=999999999999999999999999999
- autostart = true
- autorestart=true
- nano lnd.conf
- [program:lnd]
- user=REPLACE-WITH-YOUR-USERNAME
- command=/home/YOUR-HOME-DIR/go/bin/lnd --bitcoin.active --bitcoin.testnet
- stdout_logfile = /home/YOUR-HOME-DIR/lnd.log
- stderr_logfile = /home/YOUR-HOME-DIR/lnd.log
- startretries=999999999999999999999999999
- autostart = true
- autorestart=true
- and start the processes
- sudo supervisorctl start btcd
- sudo supervisorctl start lnd
- monitor the log files by tailing them
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement