Skip to content

Commit 3a0f210

Browse files
committed
README: add instructions for external lightningd instance
plus some other stuff
1 parent d3990fc commit 3a0f210

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,22 @@ $ npm install -g lightning-charge
2626

2727
$ charged --api-token mySecretToken # defaults: --ln-path ~/.lightning --db-path ./charge.db --port 9112
2828

29-
# configuration options may alternatively be provided using environment variables:
30-
$ LN_PATH=~/.lightning DB_PATH=charge.db API_TOKEN=mySecretToken PORT=9112 charged
3129
```
3230

33-
Your chosen `--api-token` will be used to authenticate requests made to the Lightning Charge REST API.
31+
That's it! The Lightning Charge REST API is now running and ready to process payments.
32+
You can access it at `http://localhost:9112` using the API access token configured with `--api-token`.
33+
34+
Configuration options may alternatively be provided using environment variables:
35+
36+
```bash
37+
$ LN_PATH=~/.lightning DB_PATH=charge.db API_TOKEN=mySecretToken PORT=9112 charged
38+
```
3439

3540
See `$ charged --help` for the full list of available options.
3641

3742
### Deploy with Docker
3843

39-
Deploy with docker, comes bundled with `bitcoind`+`lightningd`+`charged`:
44+
To deploy Lightning Charge with Docker, run these commands:
4045

4146
```bash
4247
$ mkdir data # make sure to create the folder _before_ running docker
@@ -45,15 +50,22 @@ $ docker run -u `id -u` -v `pwd`/data:/data -p 9112:9112 \
4550
shesek/lightning-charge
4651
```
4752

53+
This will start `bitcoind`, `lightningd` and `charged` and hook them up together.
54+
You will then be able to access the REST API at `http://localhost:9112` using `mySecretToken`.
55+
4856
Runs in `testnet` mode by default, set `NETWORK` to override.
4957

50-
If you want to experiment in regtest mode and don't care about persisting data, this should do:
58+
If you want to experiment in `regtest` mode and don't care about persisting data, this should do:
5159

5260
```bash
5361
$ docker run -e NETWORK=regtest -e API_TOKEN=mySecretToken -p 9112:9112 shesek/lightning-charge
5462
```
5563

56-
To connect to an existing bitcoind instance running on the same machine,
64+
To connect to an existing `lightningd` instance running on the same machine,
65+
mount the lightning data directory to `/etc/lightning` (e.g. `-v $HOME/.lightning:/etc/lightning`).
66+
Connecting to remote lightningd instances is currently not supported.
67+
68+
To connect to an existing `bitcoind` instance running on the same machine,
5769
mount the bitcoin data directory to `/etc/bitcoin` (e.g. `-v $HOME/.bitcoin:/etc/bitcoin`).
5870
To connect to a remote bitcoind instance, set `BITCOIND_URI=http://[user]:[pass]@[host]:[port]`
5971
(or use `__cookie__:...` as the login for cookie-based authentication).

0 commit comments

Comments
 (0)