diff --git a/docker/lnd/start-lnd.sh b/docker/lnd/start-lnd.sh index 1fb8502ff..c7bfe3058 100755 --- a/docker/lnd/start-lnd.sh +++ b/docker/lnd/start-lnd.sh @@ -17,7 +17,7 @@ return() { # set_default function gives the ability to move the setting of default # env variable from docker file to the script thereby giving the ability to the -# user override it durin container start. +# user override it during container start. set_default() { # docker initialized env variables with blank string and we can't just # use -z flag as usually. @@ -45,10 +45,16 @@ DEBUG=$(set_default "$DEBUG" "debug") NETWORK=$(set_default "$NETWORK" "simnet") CHAIN=$(set_default "$CHAIN" "bitcoin") BACKEND="btcd" +HOSTNAME=$(hostname) if [[ "$CHAIN" == "litecoin" ]]; then BACKEND="ltcd" fi +# CAUTION: DO NOT use the --noseedback for production/mainnet setups, ever! +# Also, setting --rpclisten to $HOSTNAME will cause it to listen on an IP +# address that is reachable on the internal network. If you do this outside of +# docker, this might be a security concern! + exec lnd \ --noseedbackup \ "--$CHAIN.active" \ @@ -58,5 +64,6 @@ exec lnd \ "--$BACKEND.rpchost"="blockchain" \ "--$BACKEND.rpcuser"="$RPCUSER" \ "--$BACKEND.rpcpass"="$RPCPASS" \ + "--rpclisten=$HOSTNAME:10009" \ --debuglevel="$DEBUG" \ "$@"