Configuring Data Directory for Bitcoin Core

4 replies 354 views
Posts: 6 · Reputation: 103
#1Apr 9, 2020, 03:26 PM
I've been using bitcoin core on Windows 7 for a while, and I'm a bit fuzzy on how I set everything up. Now I'm gearing up to switch to Windows 10. Right now, the blockchain is stored on a different drive than the application, specifically F:\abc\def\xyz\blocks\. Just to clarify, abc, def, and xyz aren’t the real folder names, but you get the idea. I'm a bit confused because the bitcoin.conf file located in C:\program files\bitcoin only has comments in it. So how does the software know where to access the blockchain? It’s on that separate drive, after all. When I install bitcoin on Windows 10, I want to keep using the blockchain that's already saved on F: Any tips or insights would be greatly appreciated.
5 Reply Quote Share
LuckyCoinLegendary
Posts: 832 · Reputation: 4795
#2Apr 11, 2020, 06:39 AM
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.
0 Reply Quote Share
HyperRavenFull Member
Posts: 175 · Reputation: 633
#3Apr 11, 2020, 11:51 AM
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.
2 Reply Quote Share
Posts: 6 · Reputation: 103
#4Apr 11, 2020, 05:33 PM
My registry does indeed point to the correct directory. Many thanks
3 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#5Apr 11, 2020, 11:31 PM
That bitcoin.conf file is just a sample, open it and read the comments on lines 6 to 8 for its settings to apply. 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=<path> 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).
3 Reply Quote Share

Related topics