Open damanic opened 2 months ago
@rockstardev I'm not sure why we are using the externalip
with hostnames, but I assume it might be a remainder from back in the days where there wasn't an externalhosts
option.
The docker entrypoint has two lines where it sets externalip=
in the lnd.conf
file:
$LND_EXTERNALIP
, which is defined by the docker fragment, the value being $BTCPAY_ANNOUNCEABLE_HOST
$HIDDENSERVICE_ONION
, which is a .onion
hostnameFor the latter I haven't found any hints regarding why even use the externalip
/externalhosts
with a Tor address. Maybe this isn't necessary anymore.
For the former it would always be a hostname rather than an IP address. Imho it would be good to clarify that in the variable name and set externalhosts
rather than externalip
.
What are your thoughts?
There is currently no way to set externalip to an IP address through btcpay vars.
Btcpay will use the value of
BTCPAY_HOST
forexternalip=
which is the primary DOMAIN name for the site.If you set the var
BTCPAY_ANNOUNCEABLE_HOST
to an IP address it will be overridden by btcpay-setup.sh and reset to theBTCPAY_HOST
domain.This can cause issues when migrating to new IP or if serving the btcpay webservice behind a DNS proxy like cloudflare which will resolve the domain to cloudflares IP address instead of the LND nodes public IP address.
The assignment of a domain to
externalip
also seems to not be best practice when there is a configuration variable calledexternalhosts
that is intended for DNS resolution.Shouldn't BTCPAY allow for the
externalip
in LND conf to be set as an IP address through ENV vars for servers that have a static IP, and have the option to add BTCPAY_HOST / BTCPAY_ADDITIONAL_HOSTS asexternalhosts
entries for those that have a dynamic IP?