<p><code>bitcoin-qt</code> and <code>bitcoind</code> are built from the same source code. They largely use the same settings, data directory, and configuration file.</p>

<p>However, <code>bitcoin-qt</code> has a set of options that are specific to it. These settings are stored in a separate Qt defined location (on Windows, it's stored in the registry). <code>bitcoind</code> cannot read these settings. If you set your data directory by choosing the location in the dialog box that appears the first time you started, the data directory location is stored in the Qt specific settings so <code>bitcoind</code> cannot read it.</p>

<p>You can set the data directory for <code>bitcoind</code> by creating a <code>bitcoin.conf</code> file in the default data directory location (on Windows, that's <code>%APPDATA%/Bitcoin</code>) and adding the line</p>

<pre><code>datadir=&lt;path&gt;
</code></pre>

<p>where <code>&lt;path&gt;</code> is the path to where you want the data directory to be.</p>

<p>Or by adding <code>-datadir=&lt;path&gt;</code> to the command you are using to start <code>bitcoind</code>.</p>

<blockquote>
  <p>I use <code>bitcoind -datadir=D:\bitcoin</code> to do that, is it right?</p>
</blockquote>

<p>Yes, that is correct.</p>

<blockquote>
  <p>In my home directory (<code>C:\Users\MyName</code>) or just in the same data directory (<code>D:\bitcoin</code>)?</p>
</blockquote>

<p>You should put the config file in the data directory that the software will open initially. If you are setting <code>-datadir</code> in your startup command or the datadir is specified in your Qt settings, then you should put the config file in the data directory.</p>

<p>If not, you should put it in the default data directory location which is <code>C:\Users\&lt;username&gt;\AppData\Roaming\Bitcoin</code>.</p>

<blockquote>
  <p>Does <code>bitcoind</code> and <code>bitcoin-qt</code> use the same configure file?</p>
</blockquote>

<p>Yes.</p>

CC BY-SA 4.0
2019-04-08T23:39:57.957Z
2019-04-08T23:39:57.957Z
Ava Chow
<p>This is a multi-part question. </p>

<p>I downloaded source code of bitcoin core from github and compiled it on my Windows 10. Then I got <code>bitcoind</code> and <code>bitcoin-qt</code> among other commands. I first run <code>bitcoin-qt</code> and choose a directory(<code>D:\bitcoin</code>) for blockchain data storing. However because I need to use <code>bitcoin-cli</code> tool and bitcoin-qt doesn't expose an RPC service by default, I close bitcoin-qt and start <code>bitcoind</code>.</p>

<p>But then I found that <code>bitcoind</code> didn't download blockchain from where <code>bitcoin-qt</code> stopped(by run <code>bitcoin-cli -getinfo</code>). How can I make <code>bitcoind</code> download that way? (I use <code>bitcoind -datadir=D:\bitcoin</code> to do that, is it right?)</p>

<p>Another question is where should I put my configure file. In my home directory(<code>C:\Users\MyName</code>) or just in the same data directory(<code>D:\bitcoin</code>)? Does <code>bitcoind</code> and <code>bitcoin-qt</code> use the same configure file?</p>

CC BY-SA 4.0
2019-04-07T12:32:33.650Z
Not sure about the details on windows, but best is to point both to the same config file and datadir. Just setting -datadir should accomplish that. But I think by default, they should both use the same already, so not sure why that would not already work. Unless maybe you're starting one as Administrator and the other not (or a different user altogether). If bitcoind is running as a service, check which user it's running as (in service properties).
Jannes
<bitcoin-core><bitcoind>
Do bitcoind and bitcoin-qt resume blockchain downloading from the same place?
Bicheng
# Do bitcoind and bitcoin-qt resume blockchain downloading from the same place?

(Asked by: username_0 on 2019-04-07)

This is a multi-part question.

I downloaded source code of bitcoin core from github and compiled it on my Windows 10. Then I got `bitcoind` and `bitcoin-qt` among other commands. I first run `bitcoin-qt` and choose a directory(`D:\bitcoin`) for blockchain data storing. However because I need to use `bitcoin-cli` tool and bitcoin-qt doesn't expose an RPC service by default, I close bitcoin-qt and start `bitcoind`.

But then I found that `bitcoind` didn't download blockchain from where `bitcoin-qt` stopped(by run `bitcoin-cli -getinfo`). How can I make `bitcoind` download that way? (I use `bitcoind -datadir=D:\bitcoin` to do that, is it right?)

Another question is where should I put my configure file. In my home directory(`C:\Users\MyName`) or just in the same data directory(`D:\bitcoin`)? Does `bitcoind` and `bitcoin-qt` use the same configure file?

**Tags:** bitcoin-core, bitcoind

> **Comments:**
> **username_1**: Not sure about the details on windows, but best is to point both to the same config file and datadir. Just setting -datadir should accomplish that. But I think by default, they should both use the same already, so not sure why that would not already work. Unless maybe you're starting one as Administrator and the other not (or a different user altogether). If bitcoind is running as a service, check which user it's running as (in service properties).  

---

## 1 answers

### Answer by username_2 on 2019-04-08. Score: 2 | Accepted answer

`bitcoin-qt` and `bitcoind` are built from the same source code. They largely use the same settings, data directory, and configuration file.

However, `bitcoin-qt` has a set of options that are specific to it. These settings are stored in a separate Qt defined location (on Windows, it's stored in the registry). `bitcoind` cannot read these settings. If you set your data directory by choosing the location in the dialog box that appears the first time you started, the data directory location is stored in the Qt specific settings so `bitcoind` cannot read it.

You can set the data directory for `bitcoind` by creating a `bitcoin.conf` file in the default data directory location (on Windows, that's `%APPDATA%/Bitcoin`) and adding the line

```
datadir=<path>

```

where `<path>` is the path to where you want the data directory to be.

Or by adding `-datadir=<path>` to the command you are using to start `bitcoind`.

> I use `bitcoind -datadir=D:\bitcoin` to do that, is it right?

Yes, that is correct.

> In my home directory (`C:\Users\MyName`) or just in the same data directory (`D:\bitcoin`)?

You should put the config file in the data directory that the software will open initially. If you are setting `-datadir` in your startup command or the datadir is specified in your Qt settings, then you should put the config file in the data directory.

If not, you should put it in the default data directory location which is `C:\Users\<username>\AppData\Roaming\Bitcoin`.

> Does `bitcoind` and `bitcoin-qt` use the same configure file?

Yes.


---

