1

Every example/tutorial looks the same:

rpcpassword=<somehashofsomesort> and rpcusername=rpcuser

They always use something like rpcuser, and some hash for the password. Why is it like this? Does it offer any advantage to break out of the shell and have your username and password be something you like?

In another place I found this:

#rpcuser=alice
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=

Does setting your username to alice cause you to no longer be anonymous, and that's why everyone has the same username?

Do I even need a username and password?

1 Answer 1

3

I suggest you don't use rpcuser and password if you don't need to. If you don't set them, Bitcoin Core will use a cookie in your .bitcoin directory as a mean to identify you.

Besides rpcuser and rpcpassword are deprecated now, you're supposed to use this python script to generate a password and copy the output in your config file like this : rpcauth=[user]:[long random string]

But once again, I suggest you don't use it if you don't need it.

As for the alice username, it's just a common placeholder name originally used in cryptography, "Alice" and "Bob" are the two parties that try to communicate, Eve is the passive eavedropper that tries to snoop on their private conversation and Mallory is the active attacker that tampers messages or disrupts communication. I think there's no harm using it as a rpcuser name though.

2
  • can you please elaborate on this cookie in .bitcoin/? Where can I get more info about the filename, file contents, encoding, etc? Sep 8, 2021 at 7:47
  • 1
    The .cookie file is pretty straightforward, it is a plain text file that contains only a string in the form __cookie__:<32B of randomness>. It is automatically generated inside the datadir when Core starts.
    – Sosthène
    Mar 11, 2022 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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