I have Bitcoin-qt installed and running on an external Hard Drive. Where should I put the bitcoin.conf file so I can configure it with the server setting, user, and password?

  • You can put it anywhere you like. Look into the -conf flag.
    – KJ O
    Commented May 6, 2016 at 21:21

1 Answer 1


It depends on what OS you've got. Windows, Linux, Mac OS?

That said, one of the many possible solutions is somehow OS-independent: move everything to one single directory on your external disk including the wallet.dat file, the .conf file, the executable, and the blockchain data. Then make sure you always start your Bitcoin-Qt client from the console and include the parameters -datadir and -conf in your command line. Here is an example for Linux:

cd /my_external_harddisk/bitcoin/
./Bitcoin-Qt -datadir=. -conf=./bitcoin.conf -printtoconsole

(I added the optional -printtoconsole parameter. This prevents inflating the debug.log file somewhere on your OS disk all the time.)

In MS-Windows it would look very similar, I guess (I haven't got access to a Windows PC at the moment).

In Mac OS you may want to keep everything in a directory containing Bitcoin-Qt.app for practical reasons, but the principle is the same:

cd /Volumes/my_external_harddisk/bitcoin/
Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -datadir=. -conf=./bitcoin.conf -printtoconsole

If you later inadvertently start Bitcoin-Qt without any parameters then it simply creates an empty wallet.dat file in Bitcoin's standard directory somewhere on the OS disk. At first glance this looks as if you suddenly lost all your precious Bitcoins. Don't worry, your original wallet.dat file is still there on your external HD in perfect condition. Just exit the program and restart from the console with the parameters as explained above.

  • Umm, I did not "lose all my precious Bitcoins"... Not quite sure how you even got that assumption. I'm using a Mac. I have my .conf in the same directory as my wallet.dat file, on an external HD. I'm trying to use the JSON-RPC API, and I have set the server=1 in it, although it I am not able to access the API from the command line yet. Unsure why, it says "couldn't connect to server", but I am still downloading the blockchain, which is taking forever, so that may be the problem?
    – user31364
    Commented Feb 6, 2016 at 16:25
  • Oops, little misunderstanding here. That's why I wrote "If you later inadvertently start Bitcoin-Qt without ..." ( ... then it may look like BTC = 0.00000000 ), with emphasis on "If". Ok, I'll mark the "If" word with bold font style. Anyway, JSON RPC connection problems can have many causes. Please provide as much information as possible: Which OS and OS version? Which Bitcoin-Qt version? What else is in your .conf file? Did you add rpcuser and rpcpasswort? How did your try to access the API? What error messages did you get? Any API-related error messages in debug.log?
    – cassini
    Commented Feb 6, 2016 at 16:48
  • I am still downloading the blockchain which is taking FOREVER, but am nearing completion. I am on a Mac. The program is installed on my external hard drive, and I am running it from there. I found a Bitcoin folder in my Application Support folder and deleted it. I am interested to see, when I'm done downloading the blockchain, if the Bitcoin folder will appear again in Application Support by default when I restart it, for which I should just probably run Bitcoin Qt straight from the OS and change the data directory.
    – user31364
    Commented Feb 13, 2016 at 0:44