dappnode / DAppNodePackage-bitcoin

DAppNode package for bitcoin full node daemon
GNU General Public License v3.0
4 stars 7 forks source link

Allow user to override default rpcallowip bitcoin.conf setting #30

Closed Leibniz137 closed 2 years ago

Leibniz137 commented 2 years ago

Is your feature request related to a problem? Please describe.

I need a connection to my bitcoin node that will be stable over the course of several days.

I have always had trouble maintaining an uninterrupted connection to my dappnode via the vpn or the dappnode wifi that lasts for more than a day or so. (Not totally sure why). Because of this, I want to expose the bitcoin rpc port on my local wifi network, .

So to get this setup to work, I do the following 2 things to access the port while on my normal LAN (which my dappnode is connected to as well):

  1. expose the 8332 port using the ports tab on the bitcoin package's page in the dappnode web GUI
  2. update the rpcallowip setting to allow for connections from 192.168.0.0/24 addresses

The first is already possible via the UI, but the 2nd requires adding an environment variable to the docker-compose file (see https://github.com/dappnode/DAppNodePackage-bitcoin/pull/28), because as it stands, the rpcallowip setting can't be changed from it's default value (172.33.0.0/16) without modifying the docker image itself, so even though the port is exposed, it won't allow connections from within my LAN (say my laptop's ipaddress is 192.168.1.15). Once the envvar is added to the docker-compose file, it becomes accessible via the dappnode web GUI.

Note that the env var is already supported in the entrypoint script (see: https://github.com/dappnode/DAppNodePackage-bitcoin/blob/master/build/bin/docker_entrypoint.sh#L40), it just isn't exposed to the user via the web GUI.

Describe the solution you'd like

This setting can be exposed to the user (with a default value) by adding the environment variable to the docker-compose file, see https://github.com/dappnode/DAppNodePackage-bitcoin/pull/28

tropicar commented 2 years ago

It's a fine change, i am testing the new version of bitcoin and this change, we will upload the package with this change. Thank you very much for this effort.