TrezorHannes / vps-lnbits

Documentation how to setup LNbits on a VPS, connected to your Lightning Network Node
43 stars 7 forks source link

lnd.conf file resetting on Raspiblitz #2

Closed KodonFrost closed 2 years ago

KodonFrost commented 2 years ago

Heya!

Thank you very much for the guide. I'm stuck at step 9 however.

When I add "externalip=VPS-IP:9735" to the lnd.conf and restart the service, the entry vanishes from the config. All other settings stick. How do I avoid having the config file reset?

Also, is this modification correct for the lnd.service? Your guide says it should be "ExecStart=/usr/local/bin/lnd ${lndExtraParameter}", but my service file also contains "--configfile=/home/bitcoin/.lnd/lnd.conf"

[Service] ExecStartPre=-/home/admin/config.scripts/lnd.check.sh prestart mainnet ExecStart=/usr/local/bin/lnd ${lndExtraParameter} --configfile=/home/bitcoin/.lnd/lnd.conf

Thanks in advance!

KodonFrost commented 2 years ago

Thanks to Hakuna from the german Raspiblitz Telegram I found the solution.

The Raspiblitz checks if the node is connected to Tor, and if yes clears the external IP.

Open /home/admin/config.scripts/lnd.check.sh Comment or delete the following lines:

# enforce PublicIP if (if not running Tor)
if [ "${runBehindTor}" != "on" ]; then
  setting ${lndConfFile} ${insertLine} "externalip" "${publicIP}:${lndPort}"
else
# when running Tor a public ip can make startup problems - so remove
  sed -i '/^externalip=*/d' ${lndConfFile}
fi