2017-03-28 02:20:31 +03:00
|
|
|
|
# Installation for Lnd and Btcd
|
2017-01-06 03:35:09 +03:00
|
|
|
|
|
|
|
|
|
### If Glide isn't installed, install it:
|
|
|
|
|
```
|
|
|
|
|
$ go get -u github.com/Masterminds/glide
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Install lnd:
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
$ cd $GOPATH
|
|
|
|
|
$ git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
|
2017-01-15 04:53:23 +03:00
|
|
|
|
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
|
2017-01-06 03:35:09 +03:00
|
|
|
|
$ glide install
|
|
|
|
|
$ go install . ./cmd/...
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Create lnd.conf:
|
2017-01-06 03:35:09 +03:00
|
|
|
|
**On MacOS, located at:**
|
|
|
|
|
/Users/[username]/Library/Application Support/Lnd/lnd.conf
|
|
|
|
|
|
|
|
|
|
**On Linux, located at:**
|
|
|
|
|
~/.lnd/lnd.conf
|
|
|
|
|
|
|
|
|
|
**lnd.conf:**
|
|
|
|
|
(Note: Replace `kek` with the username and password you prefer.)
|
|
|
|
|
```
|
|
|
|
|
[Application Options]
|
|
|
|
|
rpcuser=kek
|
|
|
|
|
rpcpass=kek
|
|
|
|
|
btcdhost=127.0.0.1
|
|
|
|
|
debuglevel=debug
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Install btcutil: (must be from roasbeef fork, not from btcsuite)
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
$ go get -u github.com/roasbeef/btcutil
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Install btcd: (must be from roasbeef fork, not from btcsuite)
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
$ cd $GOPATH/src/github.com/roasbeef/btcd
|
|
|
|
|
$ glide install
|
|
|
|
|
$ go install . ./cmd/...
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Start btcd (will create rpc.cert and default btcd.conf):
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
2017-01-15 04:53:23 +03:00
|
|
|
|
$ btcd --testnet --txindex --rpcuser=kek --rpcpass=kek
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
(Note: It may take several minutes to find segwit-enabled peers.)
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Add a limited username and password to btcd.conf and restart
|
2017-01-06 03:35:09 +03:00
|
|
|
|
(Note: Replace `kek` with the username and password you prefer.)
|
|
|
|
|
|
|
|
|
|
**On Linux:**
|
|
|
|
|
```
|
|
|
|
|
$ sed -i 's#; rpclimituser=whatever_limited_username_you_want#rpclimituser=kek#' ~/.btcd/btcd.conf
|
|
|
|
|
$ sed -i 's#; rpclimitpass=#rpclimitpass=kek#' ~/.btcd/btcd.conf
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**On MacOS:**
|
|
|
|
|
```
|
|
|
|
|
$ sed -i 's#; rpclimituser=whatever_limited_username_you_want#rpclimituser=kek#' /Users/[username]/Library/Application Support/Btcd/btcd.conf
|
|
|
|
|
$ sed -i 's#; rpclimitpass=#rpclimitpass=kek#' /Users/[username]/Library/Application Support/Btcd/btcd.conf
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-01 04:32:28 +03:00
|
|
|
|
If you did not have a `btcd.conf` file yet, you can simply paste the following into it:
|
|
|
|
|
````
|
|
|
|
|
[Application Options]
|
|
|
|
|
rpclimituser=<the username you picked in lnd.conf>
|
|
|
|
|
rpclimitpass=<the password you picked in lnd.conf>
|
|
|
|
|
````
|
|
|
|
|
|
2017-01-06 03:35:09 +03:00
|
|
|
|
**Then, regardless of OS:**
|
|
|
|
|
```
|
|
|
|
|
$ btcctl --testnet stop
|
|
|
|
|
$ btcd --testnet
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Check to see that peers are connected:
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
$ btcctl --testnet getpeerinfo | more
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Start Lnd: (Once btcd has synced testnet)
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
$ lnd --testnet
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
### Start Lnd on Simnet: (Doesn’t require testnet syncing.)
|
2017-01-06 03:35:09 +03:00
|
|
|
|
```
|
|
|
|
|
$ lnd --simnet --debughtlc
|
|
|
|
|
```
|
|
|
|
|
|
2017-03-28 02:20:31 +03:00
|
|
|
|
#### Accurate as of:
|
2017-01-15 04:53:23 +03:00
|
|
|
|
roasbeef/btcd commit: 707a14a
|
2017-01-06 03:35:09 +03:00
|
|
|
|
|
|
|
|
|
roasbeef/btcutil commit: d347e49
|
|
|
|
|
|
|
|
|
|
lightningnetwork/lnd commit: d7b36c6
|