Advertisement
Guest User

further update to lnd+btcd installation guide

a guest
Jan 21st, 2018
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. the following guide is an updated install process from the following which needs some work updating still
  2. https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md
  3.  
  4. It is specific to btcd, lnd, on testnet, running on an ubuntu 16.04 server host.
  5.  
  6. It does not address mainnet, or using bitcoind, or nuetrino.
  7.  
  8. INSTALL
  9. =======
  10.  
  11. install golang
  12. sudo apt-get install golang-1.9-go
  13. mkdir go
  14.  
  15. set go paths
  16. nano .profile
  17.  
  18. add to the end
  19. export GOROOT=/usr/lib/go-1.9/
  20. export GOPATH=$HOME/go
  21. export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
  22.  
  23. logout, log back in
  24.  
  25. check variables with
  26. go env
  27.  
  28. install glide
  29. go get -u github.com/Masterminds/glide
  30.  
  31. install lnd
  32. git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
  33. cd $GOPATH/src/github.com/lightningnetwork/lnd
  34. glide install
  35. go install . ./cmd/...
  36.  
  37. run tests
  38. go install; go test -v -p 1 $(go list ./... | grep -v '/vendor/')
  39.  
  40. install btcd
  41. git clone https://github.com/roasbeef/btcd $GOPATH/src/github.com/roasbeef/btcd
  42. cd $GOPATH/src/github.com/roasbeef/btcd
  43. glide install
  44. go install . ./cmd/...
  45.  
  46. setup a $HOME/.btcd/btcd.conf file from https://github.com/btcsuite/btcd/blob/master/sample-btcd.conf
  47.  
  48. simplest version might be
  49. [Application Options]
  50. datadir=~/.btcd/data
  51. testnet=1
  52. externalip=YOURIP #replace with your IP address
  53. ;addpeer=KNOWNPEERIP #add a known peer if you want
  54. rpcuser=REPLACEME
  55. rpcpass=REPLACEME
  56. txindex=1
  57. ; debuglevel=info
  58.  
  59. run btcd and sync (will take a long time)
  60. btcd --testnet --txindex --rpcuser=REPLACEME --rpcpass=REPLACEME
  61.  
  62. monitor progress in another terminal window with
  63. btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getinfo
  64. btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more
  65.  
  66. to run in the background (and tail log file)
  67. btcd --testnet --txindex --rpcuser=REPLACEME --rpcpass=REPLACEME >> btcd.log 2>&1 &
  68.  
  69. view logs by going
  70. tail btcd.log
  71.  
  72. [Please see EXTRA section at end, for supervisor configuration to run btcd automatically]
  73.  
  74. create $HOME/.lnd/lnd.conf
  75.  
  76. [Application Options]
  77. debuglevel=debug
  78. debughtlc=true
  79. maxpendingchannels=10
  80. noencryptwallet=true
  81. externalip=YOURIP
  82.  
  83. [Bitcoin]
  84. bitcoin.active=1
  85. bitcoin.testnet=1
  86.  
  87. [Btcd]
  88. btcd.rpcuser=<btcd rpc username>
  89. btcd.rpcpass=<btcd rpc password>
  90.  
  91. [Neutrino]
  92. # neutrino.active=1
  93. neutrino.connect=faucet.lightning.community
  94.  
  95. [Autopilot]
  96. # autopilot.active=1
  97.  
  98. Once btcd has synced, run lnd using the btcd backend and lnd.conf config file create
  99. lnd --bitcoin.active --bitcoin.testnet
  100.  
  101. to run in the background (and tail log file)
  102. lnd --bitcoin.active --bitcoin.testnet >> lnd.log 2>&1 &
  103.  
  104. tail the log file
  105. tail lnd.log
  106.  
  107. [Please see EXTRA section at end, for supervisor configuration to run automatically]
  108.  
  109. To verify things are operational
  110. lncli getinfo
  111. lncli getnetworkinfo
  112. lncli describegraph
  113.  
  114. Setup a wallet to get testnet coins from faucet (needs a np2wkh segwit format address)
  115. lncli newaddress np2wkh
  116.  
  117. open https://testnet.manu.backend.hamburg/faucet and paste in the address you created and click 'give me some coins' multiple times
  118.  
  119. After a few minutes your coins should have arrived. You can verify with
  120. lncli walletbalance
  121.  
  122. Open a channel to one or more of the following, or another peer you know
  123. Yall.org: 02ecafd1d828301da58edacdd61232835940c91767a01b3bfba57240989f9df4da@45.77.115.33:9735
  124. Htlc.me: 02d28c3aac4b4f36746052a735831afbe65bc5698a7be5bd41b42fd1ddf2a1a358@45.63.87.131:9735
  125. Bitrefill: 0298d0c6987e2e64451c7f723e15aff4dfca92f0e3973d214e206257abb0d1dd55@lnd.bitrefill.com:9735
  126. lnd.fun: 02f057867392ba8e9fe2b62b8a21ee36be00a3338d5d34cb1a2ffab3d57d8a2aea@lnd.fun:9735
  127. Eclair: 03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134@endurance.acinq.co:9735
  128. LND Faucet: 02c39955c1579afe4824dc0ef4493fdf7f3660b158cf6d367d8570b9f19683afb5@159.203.125.125:9735
  129. lncast.com: 02139a5bc1f1c929c04530a99160f2072e2a731f14c666abf87479510912279c11@lncast.com:9735
  130. Slack Tipbot: 03ba998c7cfc9e48d59bf5350ebb54356b75ba9cce6a6284628eda6bf389ce452c@194.135.83.49:9735
  131. ctrlbreak_1: 03b0d54ece3b31934a96b8c425aa33759ee9acb876cc9b92bbfe8e1c19af6c11a2@47.55.95.227:9735
  132.  
  133. Open a channel by first connection, then opening a channel as follows
  134. lncli connect pubkey@ip:port
  135. lncli openchannel --node_key=<pubkey> --local_amt=100000
  136.  
  137. verify pending & open channels using
  138. lncli pendingchannels
  139. lncli listchannels
  140.  
  141. EXTRA
  142. =====
  143. start btcd and lnd automatically using supervisor. First install supervisor
  144. sudo apt-get install supervisor
  145.  
  146. Then add two configuration files as follows:
  147. cd /etc/supervisor/conf.d
  148.  
  149. nano btcd.conf
  150.  
  151. [program:btcd]
  152. user=REPLACE-WITH-YOUR-USERNAME
  153. command=/home/YOUR-HOME-DIR/go/bin/btcd --testnet --txindex --rpcuser=REPLACEME --rpcpass=REPLACEME
  154. stdout_logfile = /home/YOUR-HOME-DIR/btcd.log
  155. stderr_logfile = /home/YOUR-HOME-DIR/btcd.log
  156. startretries=999999999999999999999999999
  157. autostart = true
  158. autorestart=true
  159.  
  160. nano lnd.conf
  161.  
  162. [program:lnd]
  163. user=REPLACE-WITH-YOUR-USERNAME
  164. command=/home/YOUR-HOME-DIR/go/bin/lnd --bitcoin.active --bitcoin.testnet
  165. stdout_logfile = /home/YOUR-HOME-DIR/lnd.log
  166. stderr_logfile = /home/YOUR-HOME-DIR/lnd.log
  167. startretries=999999999999999999999999999
  168. autostart = true
  169. autorestart=true
  170.  
  171. and start the processes
  172. sudo supervisorctl start btcd
  173. sudo supervisorctl start lnd
  174.  
  175. monitor the log files by tailing them
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement