Author

Topic: Data Directory and Conf File (Read 27 times)

legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
January 02, 2025, 12:02:53 AM
#5
I'm puzzled, because the bitcoin.conf file in C:\program files\bitcoin does not contain anything but comment lines.
That bitcoin.conf file is just a sample, open it and read the comments on lines 6 to 8 for its settings to apply.

Quote from: ps1234
So, how does the program know where to find the blockchain? After all, it's on a separate drive.
You can start bitcoin-qt with --choosedatadir to open its "Welcome Screen" where you can set it.
e.g.: ./bitcoin-qt --choosedatadir

Or as mentioned by ranochigo,
For bitcoin-qt's datadir, it's selected in the welcome screen when Bitcoin Core (GUI) couldn't find the previously set datadir or an existing datadir in the default paths which is %appdata%/bitcoin (will look here first) and %localappdata%/bitcoin (will create here if the default is selected) in v28.0.

Alternatively, if you set the above to the default datadir, you can paste the "bitcoin.conf" file there and type/uncomment the datadir= line pointing to your preferred datadir path.

The latter "alternative" works in bitcoind and bitcoin-qt while the former only works in bitcoin-qt (GUI).
jr. member
Activity: 32
Merit: 37
January 01, 2025, 11:04:20 AM
#4
My registry does indeed point to the correct directory.

Many thanks
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
January 01, 2025, 10:44:12 AM
#3
Bitcoin Core will ask the user to choose the data directory in the initial startup, or if it doesn't detect the folder in where the data directory should be. This information is stored in your registry. You can look at it using regedit and navigating to Computer\HKEY_CURRENT_USER\Software\Bitcoin\Bitcoin-Qt.



However, users shouldn't be required to touch this. If for some reason Bitcoin Core doesn't detect the data directory in the correct place (whichever data directory you initialized with), it will prompt the user again to select the correct data directory.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
January 01, 2025, 10:43:40 AM
#2
Bitcoin Core on Windows does not read the configuration from the Program Files folder, it takes it from AppData/Local (or maybe Roaming, I keep forgetting which because Windows is not my primary OS). In that folder there's another folder called Bitcoin, and the Bitcoin.conf file is in there.

So when you upgrade to Windows 10 it will just carry over there unless you format the C partition.
jr. member
Activity: 32
Merit: 37
January 01, 2025, 10:27:38 AM
#1
I have been running bitcoin core on Windows 7 for several years, and I can't remember exactly how I set it up. Now I plan to switch to Windows 10.

Currently, the data is on a separate drive from the program, in F:\abc\def\xyz\blocks\. Obviously abc, def and xyz are not the actual paths, but you get the idea.

I'm puzzled, because the bitcoin.conf file in C:\program files\bitcoin does not contain anything but comment lines. So, how does the program know where to find the blockchain? After all, it's on a separate drive.

When I install bitcoin on Windows 10, I want it to continue to use the existing blockchain in F:

Advice would be most welcome.

Jump to: