docs: add installation instructions
This commit is contained in:
parent
d7b36c6f31
commit
e91c1b8136
28
README.md
28
README.md
@ -11,19 +11,23 @@ Don't try to port it to mainnet or an altcoin and use it today! No really. Lig
|
||||
|
||||
## Installation
|
||||
|
||||
* In order to build form source, the following build dependancies are required:
|
||||
* In order to build form source, the following build dependancies are required:
|
||||
* **Go 1.5 or 1.6**
|
||||
|
||||
Installation instructions can be found here: http://golang.org/doc/install. It is recommended to add `$GOPATH/bin` to your `PATH` at this point.
|
||||
**Note:** If you are building with Go 1.5, then you'll need to enable the vendor experiment by setting the `GO15VENDOREXPERIMENT` environment variable to `1`. If you're using Go 1.6 or later, then it is safe to skip this step.
|
||||
* **Glide**
|
||||
|
||||
This project uses `Glide` to manage depdnancies as well as to provide *reproducable builds*.
|
||||
To install `Glide`, execute the following command (assumes you already have Go properly installed):
|
||||
|
||||
`$ go get -u github.com/Masterminds/glide`
|
||||
|
||||
With the prelimnary steps completed, to install `lnd`, `lncli`, and all related depenancies run the following commands:
|
||||
Installation instructions can be found here: http://golang.org/doc/install. It is recommended to add `$GOPATH/bin` to your `PATH` at this point.
|
||||
**Note:** If you are building with Go 1.5, then you'll need to enable the vendor experiment by setting the `GO15VENDOREXPERIMENT` environment variable to `1`. If you're using Go 1.6 or later, then it is safe to skip this step.
|
||||
* **Glide**
|
||||
|
||||
This project uses `Glide` to manage depdnancies as well as to provide *reproducable builds*.
|
||||
To install `Glide`, execute the following command (assumes you already have Go properly installed):
|
||||
|
||||
`$ go get -u github.com/Masterminds/glide`
|
||||
* **btcd**
|
||||
|
||||
This project currently requires `btcd` with segwit support, which is not merged yet. To install,
|
||||
please see [the installation instructions](docs/INSTALL.md).
|
||||
|
||||
With the prelimnary steps completed, to install `lnd`, `lncli`, and all related depenancies run the following commands:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
@ -33,7 +37,7 @@ $ go install . ./cmd/...
|
||||
```
|
||||
|
||||
## Updating
|
||||
To update your version of `lnd` to the latest version run the following commands:
|
||||
To update your version of `lnd` to the latest version run the following commands:
|
||||
```
|
||||
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
$ git pull && glide install
|
||||
|
93
docs/INSTALL.md
Normal file
93
docs/INSTALL.md
Normal file
@ -0,0 +1,93 @@
|
||||
#Installation for Lnd and Btcd
|
||||
|
||||
### If Glide isn't installed, install it:
|
||||
```
|
||||
$ go get -u github.com/Masterminds/glide
|
||||
```
|
||||
|
||||
###Install lnd:
|
||||
```
|
||||
$ cd $GOPATH
|
||||
$ git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
$ cd lightningnetwork/lnd
|
||||
$ glide install
|
||||
$ go install . ./cmd/...
|
||||
```
|
||||
|
||||
###Create lnd.conf:
|
||||
**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
|
||||
```
|
||||
|
||||
###Install btcutil: (must be from roasbeef fork, not from btcsuite)
|
||||
```
|
||||
$ go get -u github.com/roasbeef/btcutil
|
||||
```
|
||||
|
||||
###Install btcd: (must be from roasbeef fork, not from btcsuite)
|
||||
```
|
||||
$ cd $GOPATH/src/github.com/roasbeef/btcd
|
||||
$ glide install
|
||||
$ go install . ./cmd/...
|
||||
```
|
||||
|
||||
###Start btcd (will create rpc.cert and default btcd.conf):
|
||||
```
|
||||
$ btcd --testnet
|
||||
```
|
||||
(Note: It may take several minutes to find segwit-enabled peers.)
|
||||
|
||||
###Add a limited username and password to btcd.conf and restart
|
||||
(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
|
||||
```
|
||||
|
||||
**Then, regardless of OS:**
|
||||
```
|
||||
$ btcctl --testnet stop
|
||||
$ btcd --testnet
|
||||
```
|
||||
|
||||
###Check to see that peers are connected:
|
||||
```
|
||||
$ btcctl --testnet getpeerinfo | more
|
||||
```
|
||||
|
||||
###Start Lnd: (Once btcd has synced testnet)
|
||||
```
|
||||
$ lnd --testnet
|
||||
```
|
||||
|
||||
###Start Lnd on Simnet: (Doesn’t require testnet syncing.)
|
||||
```
|
||||
$ lnd --simnet --debughtlc
|
||||
```
|
||||
|
||||
####Accurate as of:
|
||||
roasbeef/btcd commit: f7259f6
|
||||
|
||||
roasbeef/btcutil commit: d347e49
|
||||
|
||||
lightningnetwork/lnd commit: d7b36c6
|
Loading…
Reference in New Issue
Block a user