kpie
kpie

Reputation: 11110

add a RPC password to your bitcoin.conf file

I'm following instructions here and it says that I will find a bitcoin.conf file Windows: %APPDATA%\Bitcoin\ and

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: rpcpassword=change_this_to_a_long_random_password

However When I navigate to %APPDATA%\Bitcoin\ I don't see a bitcoin.conf file. enter image description here

So What do I do? Do I add a bitcoin.conf file? There is a bitcoin-conf.md file in doc in my bitcoin install directory so maybe somthing todo with that? I really don't know. Thanks for pointing me in the right direction.

Upvotes: 4

Views: 8923

Answers (2)

Ian Green
Ian Green

Reputation: 31

  1. That guide does not take into account the fact that you do not have to add any RPC user or password to your configuration file for the past some years. Bitcoind will generate a cookie that allows the CLI (command line interface) to communicate with the Bitcoin daemon using RPC without the user having had to give it a single thought.

  2. That is a developers' guide, so developers may have more complex requirements that are solved if they specify their own RPC authentication settings, such as running multiple wallets, or possibly exchange software that communicates with the wallet or multiple wallets.

  3. bitcoin.conf being optional, it is not by default created, and is not needed for ordinary usage, only becoming necessary when the user or developer has particular, non-default settings to set.

  4. The possible settings can be found by the help command bitcoind -help and lists a number of command line parameters (beginning with a dash or hyphen) that can be typed or pasted after bitcoind on the command line, but can be put in a text file named bitcoin.conf without the minus sign before the command. For example: -connect=IPAddress becomes simply connect=IPAddress in the conf file.

  5. For creating suitable rpcauth (username and hashed password), and rpcuser and rpcpassword values, I've found some resources such as https://github.com/jlopp/bitcoin-core-rpc-auth-generator

Rather than serving JLopp's RPC auth generator locally you can simply copy from, or use a Python script found in the Bitcoin repository under the folder named "share", you will see a folder called rpcauth which contains the rpcauth.py script and a small explanatory file called README.md.

Upvotes: 2

Yuri Ginsburg
Yuri Ginsburg

Reputation: 2601

You have to create this file and put a single line rpcpassword=<your_password> in it.

bitcoin-conf.md contains documentation for this btcoin.conf and particularily states:

The configuration file is not automatically created; you can create it using your favorite text editor.

Recommended reading this doc. It may help you to facilitate running your node.

Upvotes: 2

Related Questions