<p>That <code>Bitcoin-Qt.conf</code> file is one generated by Qt and is used to store the settings that you can change through the Settings &gt; Options window. This file should not be modified directly but rather through the Options window. Each of those settings have corresponding command line (and therefore bitcoin.conf) options. The settings specified in the bitcoin.conf override those stored by Qt in <code>Bitcoin-Qt.conf</code>, and the bitcoin.conf settings are overridden by the command line options. It is also important to note that the settings stored in Bitcoin-Qt.conf are only used by bitcoin-qt, bitcoind will not use those settings.</p>
<p>Since you have set the datadir in the bitcoin.conf, the value set in the Qt settings is not used. It is unnecessary to change them.</p>
<blockquote>
<p>P.S.: can I delete the files in <code>/home/myUserName/.bitcoin</code> other than bitcoin.conf?</p>
</blockquote>
<p>No, that can cause corruption. They are not useless files; Bitcoin Core uses them for its operation.</p>

CC BY-SA 4.0
2021-08-26T19:58:29.380Z
2021-08-26T19:58:29.380Z
Ava Chow
<p>I just changed the system on which I'm running a node from a Mac to a Ubuntu Linux system. On the Ubuntu system the blockchain data is on a disk device different from the root disk containing my home directory. I copied the blockchain data of a couple of days ago from the Mac to the Ubuntu system. In <code>/home/myUserName/.bitcoin/bitcoin.conf</code> I set datadir=[path to data disk]. The other files in that directory seem what I'd expect virgin, pre-IBD, files to look like. I ran bitcoin-qt and it brought the blockchain up to date on the data disk.</p>
<p>Then I happened to notice that there is a <code>home/myUserName/.config/Bitcoin/Bitcoin-Qt.conf</code> file and it contains <code>StrDataDir=/home/myUserName/.bitcoin</code>, i.e., the default and now incorrect blockchain data location. Should I change that? Or maybe it's telling bitcoin-qt where the bitcoin.conf file is?</p>
<p>P.S.: can I delete the files in <code>/home/myUserName/.bitcoin</code> <em>other than</em> bitcoin.conf?</p>

<bitcoin-core>
What is StrDataDir in Bitcoin-Qt.conf used for?
brec
# What is StrDataDir in Bitcoin-Qt.conf used for?

(Asked by: username_0 on 2021-08-26)

I just changed the system on which I'm running a node from a Mac to a Ubuntu Linux system. On the Ubuntu system the blockchain data is on a disk device different from the root disk containing my home directory. I copied the blockchain data of a couple of days ago from the Mac to the Ubuntu system. In `/home/myUserName/.bitcoin/bitcoin.conf` I set datadir=[path to data disk]. The other files in that directory seem what I'd expect virgin, pre-IBD, files to look like. I ran bitcoin-qt and it brought the blockchain up to date on the data disk.

Then I happened to notice that there is a `home/myUserName/.config/Bitcoin/Bitcoin-Qt.conf` file and it contains `StrDataDir=/home/myUserName/.bitcoin`, i.e., the default and now incorrect blockchain data location. Should I change that? Or maybe it's telling bitcoin-qt where the bitcoin.conf file is?

P.S.: can I delete the files in `/home/myUserName/.bitcoin` *other than* bitcoin.conf?

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2021-08-26. Score: 2 | Accepted answer

That `Bitcoin-Qt.conf` file is one generated by Qt and is used to store the settings that you can change through the Settings > Options window. This file should not be modified directly but rather through the Options window. Each of those settings have corresponding command line (and therefore bitcoin.conf) options. The settings specified in the bitcoin.conf override those stored by Qt in `Bitcoin-Qt.conf`, and the bitcoin.conf settings are overridden by the command line options. It is also important to note that the settings stored in Bitcoin-Qt.conf are only used by bitcoin-qt, bitcoind will not use those settings.

Since you have set the datadir in the bitcoin.conf, the value set in the Qt settings is not used. It is unnecessary to change them.

> P.S.: can I delete the files in `/home/myUserName/.bitcoin` other than bitcoin.conf?

No, that can cause corruption. They are not useless files; Bitcoin Core uses them for its operation.


---

