Tunnelsats / tunnelsats

Tunnel⚡Sats: Pre-configured VPN for Lightning Nodes
https://tunnelsats.github.io/tunnelsats/
MIT License
34 stars 9 forks source link

Umbrel v0.5 & CLN app: avoid editing non-persisting files #8

Open blckbx opened 2 years ago

blckbx commented 2 years ago

On Umbrel 0.5 we currently make changes to files that are being replaced on app updates (e.g. new cln version from app store). The changes need to be redone by the user each time which is not sustainable. Instead of editing exports.sh and docker-compose.yml manually (see https://github.com/blckbx/tunnelsats#cln), we can create a default config file for CLN (Umbrel does not create that default config file on its own).

path to file:

~/umbrel/app-data/core-lightning/data/lightningd/config

contents:

bind-addr=0.0.0.0:9735
always-use-proxy=false
announce-addr={vpnIP}:{ vpnPort}

Problem here, we cannot use bind-addr in config file because it's already used by CLN's docker-compose.yml:

      - --bind-addr=${APP_CORE_LIGHTNING_DAEMON_IP}:9735

which is exposed as port 9736:

      - ${APP_CORE_LIGHTNING_DAEMON_PORT}:9735
...
export.sh:
      export APP_CORE_LIGHTNING_DAEMON_PORT="9736"

=> double-binding of port 9735

blckbx commented 2 years ago

Making use of TunnelSats docker container IP, we can cut editing down to one file (port change of exports.sh) besides creating a separate CLN config file (which should be default on Umbrel).

bind-addr=10.9.9.9:9735
always-use-proxy=false
announce-addr={vpnIP}:{vpnPort}