How to change the data directory with bitcoin-cli?

7

2

I am trying to change the data directory used by bitcoind and I am uder the impression that the command -datadir was removed as I can't find it with bitcoin-cli help, when I try to use it I get Too few parameters and bitcoin-cli help datadir says datadir doesn't exist. I need to specify a directory that is not on the root partition, how to do it ?

Also why bitcoin core is so user unfriendly, it's quite surprising I thought it was the main bitcoin program. It started downloading the blockchain on my root partition without me even being aware of it (just start bitcoind and it starts silently downloading).

ChiseledAbs

Posted 2016-08-05T03:30:24.797

Reputation: 245

Yeah, it would be better if it asked us where we wanted to store the large data files, when we install via the command line. It does not. Not even a warning or anything. Glad I found this post. :-)Norman Bird 2019-11-14T02:01:37.527

Answers

5

you should use it like this bitcoin

bitcoind -datadir=/your/external/path

Hope this helps!

Web Weave

Posted 2016-08-05T03:30:24.797

Reputation: 319

4

If you would like to do this permanently create a ~/.bitcoin/bitcoin.conf file and include:

datadir=/your/path

tsusanka

Posted 2016-08-05T03:30:24.797

Reputation: 277