Browse Source

doc: Give an example of the supported DSN formats

I was told that DSNs are not trivial to format, so this adds an example to
help setup the postgres wallet backend.
travis-debug
Christian Decker 5 years ago
committed by Rusty Russell
parent
commit
f00e9d6ea8
  1. 26
      doc/lightningd-config.5
  2. 17
      doc/lightningd-config.5.md

26
doc/lightningd-config.5

@ -227,6 +227,30 @@ name, including a scheme such as \fBsqlite3\fR or \fBpostgres\fR followed by the
connection parameters\.
The default wallet corresponds to the following DSN:
.nf
.RS
--wallet=sqlite3://$HOME/.lightning/bitcoin/lightningd.sqlite3
.RE
.fi
The following is an example of a postgresql wallet DSN:
.nf
.RS
--wallet=postgres://user:pass@localhost:5432/db_name
.RE
.fi
This will connect to a the DB server running on \fBlocalhost\fR port \fB5432\fR,
authenticate with username \fBuser\fR and password \fBpass\fR, and then use the
database \fBdb_name\fR\. The database must exist, but the schema will be managed
automatically by \fBlightningd\fR\.
\fBencrypted-hsm\fR
If set, you will be prompted to enter a password used to encrypt the \fBhsm_secret\fR\.
Note that once you encrypt the \fBhsm_secret\fR this option will be mandatory for
@ -283,7 +307,7 @@ extremely busy node for you to even notice\.
\fBlarge-channels\fR
Removes capacity limits for channel creation\. Version 1\.0 of the specification
limited channel sizes to 16777216 satoshi\. With this option (which your
limited channel sizes to 16777215 satoshi\. With this option (which your
node will advertize to peers), your node will accept larger incoming channels
and if the peer supports it, will open larger channels\. Note: this option
is spelled \fBlarge-channels\fR but it's pronounced \fBwumbo\fR\.

17
doc/lightningd-config.5.md

@ -182,6 +182,23 @@ Identify the location of the wallet. This is a fully qualified data source
name, including a scheme such as `sqlite3` or `postgres` followed by the
connection parameters.
The default wallet corresponds to the following DSN:
```
--wallet=sqlite3://$HOME/.lightning/bitcoin/lightningd.sqlite3
```
The following is an example of a postgresql wallet DSN:
```
--wallet=postgres://user:pass@localhost:5432/db_name
```
This will connect to a the DB server running on `localhost` port `5432`,
authenticate with username `user` and password `pass`, and then use the
database `db_name`. The database must exist, but the schema will be managed
automatically by `lightningd`.
**encrypted-hsm**
If set, you will be prompted to enter a password used to encrypt the `hsm_secret`.
Note that once you encrypt the `hsm_secret` this option will be mandatory for

Loading…
Cancel
Save