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!

2 Answers 2


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.


Thanks for the reply!

I have sorted my problem. Didn't have the time to read you reply though :)

Can't fight the behaviour of bitcoind making own .bitcoin data dir on SD card, then join it. In that dir I created bitcoin.conf file and that's the sole contents of that dir.

In the bitcoin.conf file I added lines:


as well as


because the blocks I have on external drive have been pruned. Lack of this pruning setting was another part of the problem.

and both bitcoind and bitcoin-qt now starting up correctly with no questions, errors or pop-up messages. They are behaving the same now.

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.