2

Sorry, noob question I am new to anything linux related. I managed to set up bitcoin core just fine on my raspberry pi 4 and I have an external HDD that I want to use as my data directory for the 250 GB or so of blocks (this is not my main storage that I boot from).

Problem is, I have absolutely no idea how the bitcoind program decides on its data directory. I have run 3 or 4 times and I have 3 or 4 different data directories, none of which are on the HDD. How do I tell it where to store the data? Also, where do I put the bitcoin.conf file because it can never seem to find it. I have most of the blockchain pre-installed on my HDD from my windows pc and so I would ideally use that same directory but if thats not possible thats fine, I at least want it on my HDD though. I have followed several guides and nothing has worked for me so far. I appreciate your time for any respones!

4

Unless explicitly told otherwise, the datadir is always placed in /home/$USER/.bitcoin, there is no logic for automatically using any location other than this. The configuration file is always in the data directory as bitcoin.conf.

|improve this answer|||||
2

One of the ways of pointing to your data directory is making a change to your bitcoin.conf file (it's usually located in ~/.bitcoin/bitcoin.conf path) Add the line:

datadir = /path_to_your_data_directory

If you're on raspberry Pi I highly suggest reading through the Raspibolt documentation, it's step by step installation guide, linking specific chapter related to your question below: https://stadicus.github.io/RaspiBolt/raspibolt_30_bitcoin.html#prepare-data-directory

|improve this answer|||||
  • 1
    3 second delta has got to be some sort of new record. – Anonymous Feb 20 at 20:18
1

When you start bitcoind, you can specify a non-default data directory:

$ bitcoind datadir=/your/custom/filepath

This will override the option set in the bitcoin.conf file, if there is one set there.

|improve this answer|||||
0

here i have some example script for UTX token ( bitcoind and the friend )

example script and manage blockchain

also in that script include block monitoring using bash and qt compare with public blockchain explore node

|improve this answer|||||

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.