0

Apologies if this isn't so much a bitcoin question, as a docker or RPC explorer one. Although my trouble seems to be correctly exposing bitcoind RPC so I'm hoping someone might be able to illuminate where I'm going wrong.

I'm trying to run bitcoind and RPC Explorer in docker containers, so far bitcoind is running successfully and fully synced to chain. But I can't get the RPC connection to work for the Explorer. To keep my setup as simple as possible I'm trying to pass all the relevant environment variables to each container using docker compose as follows. The Explorer runs, but cannot connect to RPC:

services:
  bitcoin:
    container_name: bitcoind
    user: 1000:100
    image: lncm/bitcoind:v27.0
    environment:
      BTC_DISABLEWALLET: 1
      BTC_SERVER: 1
      BTC_RPCUSER: $USER
      BTC_RPCPASSWORD: $PASS
      BTC_RPCBIND: 0.0.0.0
      BTC_RPCPORT: 8332
    volumes:
      - /TIMECHAIN:/data/.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
    image: tyzbit/btc-rpc-explorer:latest
    user: 1000:100
    environment:
      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
1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.