1
1
---
2
2
layout : page
3
3
title : Stage 1 - Setting up a local cluster
4
- ---
4
+ ---
5
5
### Introduction
6
6
7
7
In this stage of the tutorial, we will learn how to set up a local cluster of
@@ -133,7 +133,7 @@ $ tree $GOPATH -L 2
133
133
Start up the Alice node from within the ` alice ` directory:
134
134
``` bash
135
135
cd $GOPATH /dev/alice
136
- alice$ lnd --rpclisten=localhost:10001 --listen=localhost:10011 --restlisten=localhost:8001 --datadir=data --logdir=log --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek
136
+ alice$ lnd --rpclisten=localhost:10001 --listen=localhost:10011 --restlisten=localhost:8001 --datadir=data --logdir=log --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek
137
137
```
138
138
The Alice node should now be running and displaying output ending with a line
139
139
beginning with "Waiting for wallet encryption password."
@@ -182,7 +182,7 @@ Run Bob and Charlie:
182
182
``` bash
183
183
# In a new terminal window
184
184
cd $GOPATH /dev/bob
185
- bob$ lnd --rpclisten=localhost:10002 --listen=localhost:10012 --restlisten=localhost:8002 --datadir=data --logdir=log --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek
185
+ bob$ lnd --rpclisten=localhost:10002 --listen=localhost:10012 --restlisten=localhost:8002 --datadir=data --logdir=log --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek
186
186
187
187
# In another terminal window
188
188
cd $GOPATH /dev/charlie
@@ -252,7 +252,7 @@ Open up a new terminal window, set `$GOPATH` and include `$GOPATH/bin` in your
252
252
` PATH ` as usual. Let's create Alice's wallet and set her passphrase:
253
253
``` bash
254
254
cd $GOPATH /dev/alice
255
- alice$ lncli --rpcserver=localhost:10001 --macaroonpath=data/admin.macaroon create
255
+ alice$ lncli --rpcserver=localhost:10001 create
256
256
```
257
257
You'll be asked to input and confirm a wallet password for Alice, which must be
258
258
longer than 8 characters. You also have the option to add a passphrase to your
@@ -262,7 +262,7 @@ passphrase.
262
262
263
263
You can now request some basic information as follows:
264
264
``` bash
265
- alice$ lncli --rpcserver=localhost:10001 --macaroonpath=data/admin.macaroon getinfo
265
+ alice$ lncli --rpcserver=localhost:10001 --macaroonpath=data/chain/bitcoin/simnet/ admin.macaroon getinfo
266
266
```
267
267
` lncli ` just made an RPC call to the Alice ` lnd ` node. This is a good way to
268
268
test if your nodes are up and running and ` lncli ` is functioning properly. Note
@@ -275,21 +275,21 @@ respectively.
275
275
``` bash
276
276
# In a new terminal window, setting $GOPATH, etc.
277
277
cd $GOPATH /dev/bob
278
- bob$ lncli --rpcserver=localhost:10002 --macaroonpath=data/admin.macaroon create
278
+ bob$ lncli --rpcserver=localhost:10002 create
279
279
# Note that you'll have to enter an 8+ character password and "n" for the mnemonic.
280
280
281
281
# In a new terminal window:
282
282
cd $GOPATH /dev/charlie
283
- charlie$ lncli --rpcserver=localhost:10003 --macaroonpath=data/admin.macaroon create
283
+ charlie$ lncli --rpcserver=localhost:10003 create
284
284
# Note that you'll have to enter an 8+ character password and "n" for the mnemonic.
285
285
```
286
286
287
287
To avoid typing the ` --rpcserver=localhost:1000X ` and ` --macaroonpath ` flag
288
288
every time, we can set some aliases. Add the following to your ` .bashrc ` :
289
289
``` bash
290
- alias lncli-alice="lncli --rpcserver=localhost:10001 --macaroonpath=data/admin.macaroon"
291
- alias lncli-bob="lncli --rpcserver=localhost:10002 --macaroonpath=data/admin.macaroon"
292
- alias lncli-charlie="lncli --rpcserver=localhost:10003 --macaroonpath=data/admin.macaroon"
290
+ alias lncli-alice=" lncli --rpcserver=localhost:10001 --macaroonpath=data/chain/bitcoin/simnet/ admin.macaroon"
291
+ alias lncli-bob=" lncli --rpcserver=localhost:10002 --macaroonpath=data/chain/bitcoin/simnet/ admin.macaroon"
292
+ alias lncli-charlie=" lncli --rpcserver=localhost:10003 --macaroonpath=data/chain/bitcoin/simnet/ admin.macaroon"
293
293
```
294
294
295
295
To make sure this was applied to all of your current terminal windows, rerun
0 commit comments