@@ -4,7 +4,6 @@ title: Installation
4
4
5
5
---
6
6
7
- # Table of Contents
8
7
* [ Installation] ( #installation )
9
8
* [ Preliminaries] ( #preliminaries )
10
9
* [ Installing lnd] ( #installing-lnd )
@@ -18,10 +17,11 @@ title: Installation
18
17
* [ Running lnd using the btcd backend] ( #running-lnd-using-the-btcd-backend )
19
18
* [ Using Neutrino] ( #using-neutrino )
20
19
* [ Using bitcoind or litecoind] ( #using-bitcoind-or-litecoind )
20
+ * [ Creating a Wallet] ( #creating-a-wallet )
21
21
* [ Macaroons] ( #macaroons )
22
22
* [ Network Reachability] ( #network-reachability )
23
- * [ Simnet vs. Testnet Development] ( #simnet-vs. -testnet-development )
24
- * [ Creating an lnd.conf (Optional)] ( #creating-an-lnd.conf-( optional) )
23
+ * [ Simnet vs. Testnet Development] ( #simnet-vs-testnet-development )
24
+ * [ Creating an lnd.conf (Optional)] ( #creating-an-lndconf- optional )
25
25
26
26
# Installation
27
27
@@ -32,71 +32,97 @@ title: Installation
32
32
* ** Go:** ` lnd ` is written in Go. To install, run one of the following commands:
33
33
34
34
35
- ** Note** : The minimum version of Go supported is Go 1.11. We recommend to use 1.12.8 version of Go. The most recent v1.13 will be supported from lnd v0.8.0-beta.
35
+ ** Note** : The minimum version of Go supported is Go 1.13. We recommend that
36
+ users use the latest version of Go, which at the time of writing is
37
+ [ ` 1.13 ` ] ( https://blog.golang.org/go1.13 ) .
36
38
37
39
38
40
On Linux:
39
- ``` bash
40
- wget https://dl.google.com/go/go1.12.8.linux-amd64.tar.gz
41
- tar -C /usr/local -xzf go1.12.8.linux-amd64.tar.gz
41
+
42
+ (x86-64)
43
+ ```
44
+ wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
45
+ sha256sum go1.13.linux-amd64.tar.gz | awk -F " " '{ print $1 }'
46
+ ```
47
+
48
+ The final output of the command above should be
49
+ `68a2297eb099d1a76097905a2ce334e3155004ec08cdea85f24527be3c48e856`. If it
50
+ isn't, then the target REPO HAS BEEN MODIFIED, and you shouldn't install
51
+ this version of Go. If it matches, then proceed to install Go:
52
+ ```
53
+ tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
54
+ export PATH=$PATH:/usr/local/go/bin
55
+ ```
56
+
57
+ (ARMv6)
58
+ ```
59
+ wget https://dl.google.com/go/go1.13.linux-armv6l.tar.gz
60
+ sha256sum go1.13.linux-armv6l.tar.gz | awk -F " " '{ print $1 }'
42
61
```
62
+
63
+ The final output of the command above should be
64
+ `931906d67cae1222f501e7be26e0ee73ba89420be0c4591925901cb9a4e156f0`. If it
65
+ isn't, then the target REPO HAS BEEN MODIFIED, and you shouldn't install
66
+ this version of Go. If it matches, then proceed to install Go:
67
+ ```
68
+ tar -C /usr/local -xzf go1.13.linux-armv6l.tar.gz
69
+ export PATH=$PATH:/usr/local/go/bin
70
+ ```
71
+
43
72
On Mac OS X:
44
- ` ` ` bash
45
- brew install go
73
+ ```
74
+ brew install go@1.13
46
75
```
47
76
48
77
On FreeBSD:
49
- ` ` ` bash
78
+ ```
50
79
pkg install go
51
80
```
52
81
53
- The pre-compiled binaries are hosted on [golang download page](https://golang.org/dl/).
54
- In order to install from source, more detailed installation instructions can be found
55
- [here](http://golang.org/doc/install).
82
+ Alternatively, one can download the pre-compiled binaries hosted on the
83
+ [Golang download page](https://golang.org/dl/). If one seeks to install
84
+ from source, then more detailed installation instructions can be found
85
+ [here](https://golang.org/doc/install).
56
86
57
- At this point, you should set your ` PATH` environment variable so that your
58
- shell will be able to detect the binaries you install:
87
+ At this point, you should set your `$GOPATH` environment variable, which
88
+ represents the path to your workspace. By default, `$GOPATH` is set to
89
+ `~/go`. You will also need to add `$GOPATH/bin` to your `PATH`. This ensures
90
+ that your shell will be able to detect the binaries you install.
59
91
60
- ` ` ` bash
61
- export PATH=$PATH :/usr/local/go/bin
62
- ` ` `
63
- By default ` GOPATH` is assumed to be ` $HOME /go` . If you want to use a custom location as your
64
- workspace, you can set the GOPATH environment variable:
65
92
```bash
66
93
export GOPATH=~/gocode
67
94
export PATH=$PATH:$GOPATH/bin
68
95
```
69
96
70
- It is recommended to place the above in your ` /etc/profile` (for a system-wide installation),
71
- in ` $HOME /.profile` or in a setup script so that you can avoid typing this every time you
72
- open a new terminal window.
97
+ We recommend placing the above in your .bashrc or in a setup script so that
98
+ you can avoid typing this every time you open a new terminal window.
73
99
74
- * ** go modules:** This project uses [go modules](https://github.com/golang/go/wiki/Modules)
100
+ * **Go modules:** This project uses [Go modules](https://github.com/golang/go/wiki/Modules)
75
101
to manage dependencies as well as to provide *reproducible builds*.
76
102
77
- Usage of go modules means that you no longer need to clone
103
+ Usage of Go modules (with Go 1.12) means that you no longer need to clone
78
104
`lnd` into your `$GOPATH` for development purposes. Instead, your `lnd`
79
105
repo can now live anywhere!
80
106
81
107
### Installing lnd
82
108
83
109
With the preliminary steps completed, to install `lnd`, `lncli`, and all
84
110
related dependencies run the following commands:
85
- ` ` ` bash
111
+ ```
86
112
go get -d github.com/lightningnetwork/lnd
87
113
cd $GOPATH/src/github.com/lightningnetwork/lnd
88
114
make && make install
89
115
```
90
116
91
117
**NOTE**: Our instructions still use the `$GOPATH` directory from prior
92
- versions of Go, but with go 1.11 , it' s now possible for `lnd` to live
118
+ versions of Go, but with Go 1.12 , it's now possible for `lnd` to live
93
119
_anywhere_ on your file system.
94
120
95
121
For Windows WSL users, make will need to be referenced directly via
96
122
/usr/bin/make/, or alternatively by wrapping quotation marks around make,
97
123
like so:
98
124
99
- ```bash
125
+ ```
100
126
/usr/bin/make && /usr/bin/make install
101
127
102
128
"make" && "make" install
@@ -106,15 +132,15 @@ On FreeBSD, use gmake instead of make.
106
132
107
133
Alternatively, if one doesn't wish to use `make`, then the `go` commands can be
108
134
used directly:
109
- ` ` ` bash
135
+ ```
110
136
GO111MODULE=on go install -v ./...
111
137
```
112
138
113
139
**Updating**
114
140
115
141
To update your version of `lnd` to the latest version run the following
116
142
commands:
117
- ` ` ` bash
143
+ ```
118
144
cd $GOPATH/src/github.com/lightningnetwork/lnd
119
145
git pull
120
146
make clean && make && make install
@@ -124,7 +150,7 @@ On FreeBSD, use gmake instead of make.
124
150
125
151
Alternatively, if one doesn't wish to use `make`, then the `go` commands can be
126
152
used directly:
127
- ```bash
153
+ ```
128
154
cd $GOPATH/src/github.com/lightningnetwork/lnd
129
155
git pull
130
156
GO111MODULE=on go install -v ./...
@@ -133,7 +159,7 @@ GO111MODULE=on go install -v ./...
133
159
**Tests**
134
160
135
161
To check that `lnd` was installed properly run the following command:
136
- ```bash
162
+ ```
137
163
make check
138
164
```
139
165
@@ -248,7 +274,7 @@ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more
248
274
If you are on testnet, run this command after `btcd` has finished syncing.
249
275
Otherwise, replace `--bitcoin.testnet` with `--bitcoin.simnet`. If you are
250
276
installing `lnd` in preparation for the
251
- [tutorial](http ://dev.lightning.community/tutorial), you may skip this step.
277
+ [tutorial](https ://dev.lightning.community/tutorial), you may skip this step.
252
278
```
253
279
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --btcd.rpcuser=kek --btcd.rpcpass=kek --externalip=X.X.X.X
254
280
```
@@ -257,8 +283,8 @@ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --btcd.rpcuser=kek --b
257
283
258
284
In order to run `lnd` in its light client mode, you'll need to locate a
259
285
full-node which is capable of serving this new light client mode. `lnd` uses
260
- [BIP 157](https://github.com/bitcoin/bips/tree /master/bip-0157) and [BIP
261
- 158](https://github.com/bitcoin/bips/tree /master/bip-0158) for its light client
286
+ [BIP 157](https://github.com/bitcoin/bips/blob /master/bip-0157.mediawiki ) and [BIP
287
+ 158](https://github.com/bitcoin/bips/blob /master/bip-0158.mediawiki ) for its light client
262
288
mode. A public instance of such a node can be found at
263
289
`faucet.lightning.community`.
264
290
@@ -344,6 +370,20 @@ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoin
344
370
`lnd` plus any application that consumes the RPC could cause `lnd` to miss
345
371
crucial updates from the backend.
346
372
373
+
374
+ # Creating a wallet
375
+ If `lnd` is being run for the first time, create a new wallet with:
376
+ ```
377
+ lncli create
378
+ ```
379
+ This will prompt for a wallet password, and optionally a cipher seed
380
+ passphrase.
381
+
382
+ `lnd` will then print a 24 word cipher seed mnemonic, which can be used to
383
+ recover the wallet in case of data loss. The user should write this down and
384
+ keep in a safe place.
385
+
386
+
347
387
# Macaroons
348
388
349
389
`lnd`'s authentication system is called **macaroons**, which are decentralized
@@ -421,3 +461,15 @@ for Litecoin accordingly. See a more detailed sample config file available
421
461
and explore the other sections for node configuration, including `[Btcd]`,
422
462
`[Bitcoind]`, `[Neutrino]`, `[Ltcd]`, and `[Litecoind]` depending on which
423
463
chain and node type you're using.
464
+
465
+
466
+
467
+
468
+ ### Next Steps
469
+
470
+ * **[Tutorial](/tutorial/):** Get acquainted with the skills necessary for `lnd` development.
471
+ * **[Developer Guides](/guides/):** Look through developer manuals on gRPC,
472
+ Docker, and more.
473
+ * **[Resources](/resources/):** Learn about the Lightning Network
474
+ * **[Code Contribution Guidelines](/contribute/):** Contribute to `lnd` itself.
475
+
0 commit comments