This is what happens after I run this command bitcoind --regtest --printtoconsole, my guess is that it's something to do with bitcoin.conf

enter image description here

My bitcoin.conf file looks like this:


If you need more context, these are my other questions: trouble with bitcoin cli regtest and interacting with bitcoin over docker

  • I don't see anything wrong. Commented Apr 19, 2017 at 15:33
  • but- I get this- bitcoin-cli -regtest getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port) Commented Apr 19, 2017 at 15:33
  • Try removing the rpcconnect line. rpcconnect is an option to bitcoin-cli, not bitcoind. Commented Apr 19, 2017 at 15:48
  • ah- I removed it but- same error :/ Commented Apr 19, 2017 at 15:49
  • In fact, you can delete your bitcoin.conf entirely. bitcoind will create its own password if you don't set one (cookie), and bitcoin-cli can find it. All the other options are default. So I suggest just delete bitcoin.conf, restart bitcoind, and then try again. Commented Apr 19, 2017 at 15:52

1 Answer 1


just do this...

To use bitcoind and bitcoin-cli, you will need to add a RPC password to your bitcoin.conf file. Both programs will read from the same file if both run on the same system as the same user, so any long random password will work:


in the future I'll be sure to RTFM

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.