익명 15:52

Bitcoin-qt and Bitcoind see bitcoin.conf file differently

Bitcoin-qt and Bitcoind see bitcoin.conf file differently

Using Bitcoin core 25.1 on Raspberry Pi. Have .bitcoin dir on external drive.

Bitcoin-25.1 package after unarchiving came with bin folder containing Bitcoin-QT and Bitcoind binary files. Bitcoin.conf file lived in the root dir of this folder.

I specified .bitcoin dir on external drive for Bitcoin-Qt the first time it started up and since then it know where it is.

However each time I start Bitcoind it makes .bitcoin dir on SD drive no matter how or where I put bitcoin.conf file for it to read from.

I use Bitcoin-Qt for playing around. Main work is done by Bitcoind. I expect both reading the same bitcoin.conf file, but it's not happening. Also, Bitcoin-QT keeps crashing its QT part as I use KVM switch to switch HDMI.

My quesions are:

  1. Where Bitcoin-Qt is really keeping it's own conf file remembering where .bitcoin dir is as I move bitcoin.conf around? I can delete bitcoin.conf from the computer and it would still find .bitcoin dir on external drive correctly.
  2. How to make Bitcoind use external drive? Trying to take advantage of .bitcoin dir it is creating every time on SD drive. I copied all contents of healthy data dir of the external drive except blocks dir and made bitcoin.conf pointing to blocksdir on external drive. But with no success.

Any thoughts would be appreciated!



Top Answer/Comment:

Where Bitcoin-Qt is really keeping it's own conf file remembering where .bitcoin dir is as I move bitcoin.conf around?

bitcoin-qt uses QSettings which maintains the settings in a separate location that depends on your operating system. This allows bitcoin-qt to maintain its own settings independent of bitcoind. When you set the datadir location in bitcoin-qt, it reads and writes it from those settings rather than to a bitcoin.conf or anything that would be shared with bitcoind.

Since QSettings is specific to bitcoin-qt, bitcoind cannot read it and thus does not know about your different datadir location.

How to make Bitcoind use external drive?

You can create a bitcoin.conf file in .bitcoin/ and add a datadir=<path> line. Any configuration settings that you want to apply should be done in that bitcoin.conf, as any bitcoin.conf in your actual datadir will be ignored.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다