Friday, November 22, 2024

json rpc – Connecting bitcoind and BTC RPC Explorer in docker

Apologies if this is not a lot a bitcoin query, as a docker or RPC explorer one. Though my bother appears to be accurately exposing bitcoind RPC so I am hoping somebody would possibly be capable to illuminate the place I am going flawed.

I am making an attempt to run bitcoind and RPC Explorer in docker containers, to this point bitcoind is working efficiently and totally synced to chain. However I am unable to get the RPC connection to work for the Explorer. To maintain my setup so simple as doable I am making an attempt to cross all of the related atmosphere variables to every container utilizing docker compose as follows. The Explorer runs, however can not connect with RPC:

companies:
  bitcoin:
    container_name: bitcoind
    consumer: 1000:100
    picture: lncm/bitcoind:v27.0
    atmosphere:
      BTC_DISABLEWALLET: 1
      BTC_SERVER: 1
      BTC_RPCUSER: $USER
      BTC_RPCPASSWORD: $PASS
      BTC_RPCBIND: 0.0.0.0
      BTC_RPCPORT: 8332
    volumes:
      - /TIMECHAIN:/knowledge/.bitcoin
    restart: on-failure
    stop_grace_period: 15m30s
    ports:
      - "8333:8333"
      - "8332:8332"
      - "28332:28332"
      - "28333:28333"
    network_mode: host
  explorer:
    container_name: btc-rpc-explorer
    picture: tyzbit/btc-rpc-explorer:newest
    consumer: 1000:100
    atmosphere:
      BTCEXP_HOST: 0.0.0.0
      BTCEXP_PORT: 3002
      BTCEXP_BITCOIND_HOST: localhost
      BTCEXP_BITCOIND_PORT: 8332
      BTCEXP_BITCOIND_USER: $USER
      BTCEXP_BITCOIND_PASS: $PASS
      BTCEXP_SLOW_DEVICE_MODE: false
    restart: on-failure
    ports:
      - "3002:3002"
    network_mode: host

networks:
  default:
    driver: bridge

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles