Closed MegalithicBTC closed 3 months ago
Within litd
there is only one single port that does everything! It might be called "web UI" only in some places, which would be outdated. But on the 8443
port you get everything: gRPC of all subservers (including lnd
and tapd
), REST (if you use --enablerest
), the web UI (static HTML page and assets) and grpc-web
(mostly used by the web UI itself).
This is documented here, but you're right, on the command line it's not obvious and we should probably update that.
Got it. Was wondering specifically because was assuming I could run multiple instances of litd
, like, one for Testnet and one for Mainnet, on the same machine. I'm used to doing this with lnd
, just by specifying different RPC listen ports in the configuration. Maybe this isn't possible with litd
, so the solution might be something fancy with docker where the ports outside the container are like 8443 for one, and 8444 for the other... but both map internally to 8443 inside the container.... If anyone has a better solution please advise...
No, you can still do that by simply changing the default 8443
port to something else with the --httpslisten=xyz
flag. Just remember to also change the ports of all other daemons (--lnd.rpclisten=
, --lnd.listen
, --faraday.rpclisten
, --loop.rpclisten
and so on, run litd --help | grep listen
to see all) to avoid collisions.
If you don't want to deal with loop/pool/faraday for example, you can simply run with --faraday-mode=disable
, --loop-mode=disable
and so on.
Ah ok. So the only confusion is with this --httpslisten
flag. It also changes the RPC listen for litd
, not just the HTTP.
Correct. It changes the main port that everything runs through. Will create a PR to update the CLI flag description.
In the API reference, we can see a suggestion of the default GRPC_HOST:
example: https://lightning.engineering/api-docs/api/lit/accounts/list-accounts
And when using
litcli
, this seems to work, for example:However the when I run "help"
This seems to suggest that
8443
is for the "Web UI only".And I can't yet find anything in
litd --help
which would tell me how to specify an RPC listen port for LITD.