Reputation: 523
Im trying to get an RPC connection to my bitcoin core to work, but no matter what I try, it keeps failing.
I'm running Win 10 and have bitcoin core qt V0.21 running. I have tried several options to get the RPC connection to work. I tried several docker container like btc-rpc-explorer but those keep on failing with a ECONNREFUSED error. Worried about some IP problem with docker, I also tried running different python scripts (like this on: https://pypi.org/project/bitcoinrpc/) but that also gives an exception indicating that no rpc connection is possible.
So, it must be my bitcore node then, right? So I tried many different bitcoin.conf configurations without luck. My latest:
server=1
rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
rpcbind=0.0.0.0
rpcport=8332
rpcuser=myuser
rpcpass=mypass
txindex=1
Just trying to open it up as much as possible.
I also tried running bitcoind on commandline in stead of bitcoin-qt gui. The commandline output shows me that it takes the correct bitcoin.conf file. So thats okay. But what is wrong???
Upvotes: 0
Views: 3683
Reputation: 123
server=1
rpcallowip=127.0.0.1
rpcport=8332
rpcuser=myuser
rpcpass=mypass
txindex=1
If you are doing your rpc calls within localhost this conf file should be enough. I would bind to 0.0.0.0 only if you need to query from an external ip. rpcallowip=0.0.0.0/0 is also insecure
Upvotes: 0