You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,14 +63,78 @@ For the impatient here's the gist of it for Ubuntu and Debian:
63
63
cd lightning
64
64
make
65
65
66
-
Or if you like to throw `docker` into the mix:
66
+
Or if you like to throw `docker` into the mix, you have the choice with two different docker images:
67
+
68
+
The first docker image is [cdecker/lightningd](https://hub.docker.com/r/cdecker/lightningd/), it provides c-lightning with a bundled bitcoin core:
67
69
68
70
sudo docker run \
69
71
-v $HOME/.lightning:/root/.lightning \
70
72
-v $HOME/.bitcoin:/root/.bitcoin \
71
73
-p 9735:9735 \
72
74
cdecker/lightningd:latest
73
75
76
+
The second docker image is [elementsproject/lightning](https://hub.docker.com/r/elementsproject/lightningd/) (from this [Dockerfile](Dockerfile)), it is meant to be used inside docker-compose.
77
+
78
+
It has the following environment variable:
79
+
80
+
*`EXPOSE_TCP` default to false, if true, use expose c-lightning on port 9835. (Use this only for testing)
81
+
*`LIGHTNINGD_OPT` is the content of the config file of the clightning instance.
82
+
83
+
On top of this, to make configuration easier, if `LIGHTNINGD_OPT` contains the parameter `chain=`, then, the `network=` parameter will be rewritten before starting c-lightning:
84
+
85
+
| chain= | network= | New network= |
86
+
|---|---|---|
87
+
| btc | mainnet | bitcoin |
88
+
| btc | testnet | testnet |
89
+
| btc | regtest | regtest |
90
+
| ltc | mainnet | litecoin |
91
+
| ltc | testnet | litecoin-testnet |
92
+
93
+
Here is an example of a docker-compose file with litecoind and c-lightning on `testnet` which expose litecoin's rpc interface on port `32610` and c-lightning API on port `32611`:
94
+
95
+
```
96
+
version: "3"
97
+
98
+
litecoind:
99
+
image: nicolasdorier/docker-litecoin:0.15.1
100
+
environment:
101
+
BITCOIN_EXTRA_ARGS: |
102
+
testnet=1
103
+
whitelist=0.0.0.0/0
104
+
rpcport=43782
105
+
server=1
106
+
ports:
107
+
- "32610:43782"
108
+
expose:
109
+
- "43782"
110
+
volumes:
111
+
- "litecoin_datadir:/data"
112
+
113
+
clightning_litecoin:
114
+
image: elementsproject/lightning
115
+
environment:
116
+
EXPOSE_TCP: "true"
117
+
LIGHTNINGD_OPT: |
118
+
bitcoin-datadir=/etc/litecoin
119
+
bitcoin-rpcconnect=litecoind
120
+
network=testnet
121
+
alias=myawesomenode
122
+
chain=ltc
123
+
ports:
124
+
- "32611:9835"
125
+
expose:
126
+
- "9835"
127
+
volumes:
128
+
- "clightning_litecoin_datadir:/root/.lightning"
129
+
- "litecoin_datadir:/etc/litecoin"
130
+
links:
131
+
- litecoind
132
+
133
+
volumes:
134
+
litecoin_datadir:
135
+
clightning_litecoin_datadir:
136
+
```
137
+
74
138
### Starting `lightningd`
75
139
76
140
In order to start `lightningd` you will need to have a local `bitcoind`
0 commit comments