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
- Domain - An external domain to be used for the self-signed certificate
39
+
- IP - A static IP to be used for the self-signed certificate
39
40
40
41
#### Option 1: Via Config file `cl-rest-config.json`
41
42
For running the server, rename the file `sample-cl-rest-config.json` to `cl-rest-config.json`. Following parameters can be configured in the config file:
@@ -46,6 +47,7 @@ For running the server, rename the file `sample-cl-rest-config.json` to `cl-rest
46
47
- LNRPCPATH (Default: ``)
47
48
- RPCCOMMANDS (Default: `["*"]`)
48
49
- DOMAIN (Default: `localhost`)
50
+
- IP (Default: `127.0.0.1`)
49
51
- BIND (Default: `::`)
50
52
51
53
#### Option 2: With the plugin configuration, if used as a plugin
@@ -60,6 +62,7 @@ If running as a plugin, configure the below options in your core lightning `conf
60
62
-`rest-lnrpcpath`
61
63
-`rest-rpc`
62
64
-`rest-domain`
65
+
-`rest-ip`
63
66
-`rest-bind`
64
67
65
68
Defaults are the same as in option # 1 with the exception that `rest-rpc` is a comma separated string.
@@ -129,6 +132,10 @@ With the default config, APIs will be served over `https` (a self signed certifi
129
132
Sample url: `https://localhost:3001/v1/getinfo/`
130
133
131
134
Providing a `DOMAIN` to the c-lightning-REST configuration will add the domain as a `subjectAltName` to the openssl certificate, permitting successful certificate validation by users and applications, e.g. Zeus, when connecting to the server at via that domain.
135
+
The same thing can be achieved with the `IP` configuration parameter, but for a static IP instead of a DNS domain.
136
+
137
+
Additionally, both `DOMAIN` and `IP` support specifying multiple comma-separated values, for instance `localhost,example.com,ln.example.com`, or `127.0.0.1,4.5.6.7`.
138
+
The resulting TLS certificate will be able to validate HTTPS responses received from any of these domains and IPs.
132
139
133
140
If you are *upgrading* a server which is already configured, you should first backup and your entire `./certs` directory in case you need to restore it later.
134
141
Following this you should delete *only* the `.certs/certificate.pem` and `.certs/key.pem` files, so that new SSL certificates can be generated which take the `subjectAltName` into consideration.
0 commit comments