<h1>How do I move my Bitcoin Core data file</h1>
<ol>
<li>Safely exit Bitcoin Core (bitcoin-qt|bitcoind).</li>
<li>Make a new secure backup copy of your <code>wallet.dat</code>.</li>
<li>Move you entire .bitcoin folder to the new location, <em><strong>except</strong> for <code>bitcoin.conf</code> which you <strong>must</strong> leave where it is in the existing .bitcoin folder.</em></li>
<li>Edit <code>bitcoin.conf</code> to add <code>datadir={full path to new .bitcoin folder}</code>.</li>
<li>Start Bitcoin Core and check properly that everything is alright, your wallet is accessible and, balances correct, etc.</li>
<li>Protect your USB disk and make regular secure backup copies of your <code>wallet.dat</code>.</li>
</ol>
<p><em>The alternative if you also move your <code>bitcoin.conf</code> file is to find and edit every shortcut that starts any Bitcoin Core process wherever they may be (and any new ones you make) and add the following including every time you type it at the command line <code>-datadir={full path to new .bitcoin folder}</code>.</em></p>
<p>Note: If storage space is an issue you can also enable the prune option; enter <code>prune={number=&gt;551}</code> in your <code>bitcoin.conf</code>. The number is in MB.</p>
<p><em>Appendix:</em> If you have to also move <code>bitcoin.conf</code> move the entire .bitcoin folder and create a symlink from ~/.bitcoin to /mnt/server/newlocation for example <code>ln -s /mnt/server/newlocation/.bitcoin ~/.bitcoin</code> - or start the bitcoin client/daemon with the -conf=&lt;file&gt; option every time e.g. <code>bitcoin-qt|bitcoind -conf=&lt;file&gt;</code> pointing to the new <code>bitcoin.conf</code> file location.</p>

CC BY-SA 4.0
2024-05-22T20:13:48.817Z
@Wilitech Could you please elaborate the way to move bitcoin.conf, too?
Hamlet Kraskian
CC BY-SA 4.0
2018-03-19T10:19:02.413Z
2024-05-24T14:31:43.147Z
2024-05-24T14:31:43.147Z
Willtech
<p>It seems several people are interested in how to create symbolic links in Windows. I know I was. This allows you to move your data directory to another hard drive without having to add the datadir flag.</p>

<p>It's actually not that much different.</p>

<p>To create a symbolic link (called a junction in Windows land) in Vista or later:</p>

<pre><code>mklink /J &lt;Link&gt; &lt;Target&gt; 
</code></pre>

<p>Make sure the folder path that you use for the &lt;Link&gt; doesn't exist before creating. </p>

<p>(c:\&lt;user&gt;\AppData\Roaming\Bitcoin by default.)</p>

<p>Reference: <a href="https://en.wikipedia.org/wiki/NTFS_junction_point#Creating_or_deleting_a_junction_point" rel="nofollow">Wikipedia</a></p>

CC BY-SA 3.0
2015-08-31T04:28:14.660Z
2015-08-31T04:28:14.660Z
Drazisil
<p>Just FYI, you can use Windows based solution, create reparse point that point to another directory, just like symlink in Linux</p>

CC BY-SA 3.0
2014-08-31T12:31:25.733Z
2014-08-31T12:31:25.733Z
rustylife
<p>That didn't quite work at first for me because some linux distros don't seem to like creating a symbolic link named “.bitcoin”.</p>

<p>I created a symbolic link named “test” in my home directory and then renamed that to “.bitcoin”</p>

<p>Using bitcoin-qt in Xubuntu12.04, this did not work:</p>

<pre><code>ln -s /new/path/to/.bitcoin .bitcoin 
</code></pre>

<p>Did work:</p>

<ul>
<li>exited bitcoin-qt</li>
<li>moved “.bitcoin” to another partition</li>
<li><p>created a valid symbolic link to there named “test”</p>

<pre><code>ln -s /new/path/to/.bitcoin test
</code></pre></li>
<li><p>renamed “test” to “.bitcoin”</p></li>
</ul>

CC BY-SA 3.0
2014-05-19T21:02:55.470Z
Could you please add some formatting and elaborate what you are referring to with "that"?
Murch
CC BY-SA 3.0
2014-06-04T10:01:18.643Z
It's not the distribution that prevents symlinks from working, usually it relates to the filesystem or the expectation of the bitcoin software that directories, paths and other URI data operates as expected.  There are better solutions than symlinks, especially across multiple filesystem types.
Ben
CC BY-SA 3.0
2014-06-04T10:02:41.707Z
Also, providing an answer for Linux when the OP clearly stated they were using Windows is pointless.
Ben
CC BY-SA 3.0
2014-09-04T19:08:23.203Z
@Murch +1 That is constructive.
Garrick
CC BY-SA 3.0
2014-09-04T19:09:02.220Z
@Ben To be fair, having received the answer I was looking for, I'm not opposed to someone adding "I had the same problem on [linux] and here is how I solved it". That will add future value to someone. Unfortunately these instructions are barely coherent and lamenting "the instructions for [Windows] didn't work on my [Commodore 64]", no kidding.
Garrick
CC BY-SA 3.0
2014-05-15T12:11:29.730Z
2015-05-19T18:26:46.287Z
2015-05-19T18:26:46.287Z
bitcoiner
<ol>
<li><p>Here:</p>

<ul>
<li><a href="https://en.bitcoin.it/wiki/Bitcoin-Qt" rel="noreferrer">https://en.bitcoin.it/wiki/Bitcoin-Qt</a></li>
<li><a href="https://www.google.com/search?q=bitcoin-qt+documentation" rel="noreferrer">https://www.google.com/search?q=bitcoin-qt+documentation</a></li>
</ul></li>
<li><p>Use the <code>-datadir</code> option.<br>
Right-click on your bitcoin-qt shortcut, press properties, and add <code>-datadir=D:\Bitcoin</code><br>
Go make that directory, then run bitcoin. If a bunch of files show up in there, you've done it correctly.</p></li>
<li><p>Yep.  </p>

<ul>
<li><code>-datadir</code></li>
<li>File > Backup Wallet</li>
</ul></li>
<li><p>Yes, but not GPU mining. <a href="https://bitcointalk.org/?topic=3878.0" rel="noreferrer">GUI miner is a nice option though.</a></p></li>
</ol>

CC BY-SA 3.0
2013-12-02T00:45:38.667Z
Did the same. Unless I did something wrong, it doesn't seem to work.
Chiffa
CC BY-SA 3.0
2014-10-26T16:58:53.877Z
What is the full datadir syntax, windows returns the error of: "`The name of C:\[Path To]\Bitcoin-qt.exe-datadir=E:\Bitcoin_Wallet specified in the Target box is not valid. Make sure the path and file name are correct`"?
GiantCowFilms
CC BY-SA 3.0
2014-10-26T17:01:53.583Z
@GiantCowFilms There's supposed to be a space between `exe` and `-datadir`.
Nick ODell
CC BY-SA 3.0
2014-10-26T17:03:32.973Z
Fixied!(Thanks @NickODell) for any one who is curious, here is the full syntax:`C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=e:\Bitcoin_Wallet`
GiantCowFilms
CC BY-SA 4.0
2023-02-09T15:21:19.220Z
How do I do this on a mac?
s_p
CC BY-SA 3.0
2013-04-06T22:36:39.047Z
2014-10-26T17:00:52.713Z
2014-10-26T17:00:52.713Z
Nick ODell
<p>I am installing Bitcoin-Qt and have been reading about Bitcoin basics, but I found very little information on the client. I have a few questions about the Bitcoin-Qt program (v0.8.1-beta under Windows 7), </p>

<ol>
<li>Where is the complete Bitcoin-Qt documentation? I can not find it.</li>
<li>How do I change the file locations for the block-chain storage?
<ul>
<li>Block chain is ~6&nbsp;GB</li>
<li>The default appears to be <code>MyDocuments\AppData\Roaming\</code></li>
<li>My C: system drive is small, and I have a second drive for such data.</li>
</ul></li>
<li>Is the "Wallet" a separate file/entity from the block-chain?
<ul>
<li>How do I define the wallet's location?</li>
<li>Can I backup the wallet by simple copy/paste/tar.gz without carrying the entire block-chain?</li>
</ul></li>
<li>Does the Bitcoin-Qt client currently have built-in mining/transaction-processing? I do not see the dialog-box to configure. I have a graphics card and ample wasted CPU-cycles.</li>
</ol>

<p>Thanks for clarification. Links to proper documentation are welcome!</p>

CC BY-SA 4.0
2021-04-24T00:27:53.503Z
If you are under Windows 10 and ~0.21, go to regedit: "Computer\HKEY_CURRENT_USER\SOFTWARE\Bitcoin\Bitcoin-Qt" and change "strDataDir"
Melih Yıldız'
<bitcoin-core><client><bitcoincore-gui>
Bitcoin-Qt setup: Change block-chain file location, settings? documentation?
Garrick
# Bitcoin-Qt setup: Change block-chain file location, settings? documentation?

(Asked by: username_0 on 2013-04-06)

I am installing Bitcoin-Qt and have been reading about Bitcoin basics, but I found very little information on the client. I have a few questions about the Bitcoin-Qt program (v0.8.1-beta under Windows 7),

1. Where is the complete Bitcoin-Qt documentation? I can not find it.
2. How do I change the file locations for the block-chain storage?
   * Block chain is ~6 GB
   * The default appears to be `MyDocuments\AppData\Roaming\`
   * My C: system drive is small, and I have a second drive for such data.
3. Is the "Wallet" a separate file/entity from the block-chain?
   * How do I define the wallet's location?
   * Can I backup the wallet by simple copy/paste/tar.gz without carrying the entire block-chain?
4. Does the Bitcoin-Qt client currently have built-in mining/transaction-processing? I do not see the dialog-box to configure. I have a graphics card and ample wasted CPU-cycles.

Thanks for clarification. Links to proper documentation are welcome!

**Tags:** bitcoin-core, client, bitcoincore-gui

> **Comments:**
> **username_1**: If you are under Windows 10 and ~0.21, go to regedit: "Computer\HKEY_CURRENT_USER\SOFTWARE\Bitcoin\Bitcoin-Qt" and change "strDataDir"  

---

## 5 answers

### Answer by username_9 on 2013-04-06. Score: 18 | Accepted answer

1. Here:

   * <https://en.bitcoin.it/wiki/Bitcoin-Qt>
   * <https://www.google.com/search?q=bitcoin-qt+documentation>
2. Use the `-datadir` option.  
   Right-click on your bitcoin-qt shortcut, press properties, and add `-datadir=D:\Bitcoin`  
   Go make that directory, then run bitcoin. If a bunch of files show up in there, you've done it correctly.
3. Yep.

   * `-datadir`
   * File > Backup Wallet
4. Yes, but not GPU mining. [GUI miner is a nice option though.](https://bitcointalk.org/?topic=3878.0)

> **Comments:**
> **username_10**: Did the same. Unless I did something wrong, it doesn't seem to work.  
> **username_11**: What is the full datadir syntax, windows returns the error of: "`The name of C:\[Path To]\Bitcoin-qt.exe-datadir=E:\Bitcoin_Wallet specified in the Target box is not valid. Make sure the path and file name are correct`"?  
> **username_9**: @username_11 There's supposed to be a space between `exe` and `-datadir`.  
> **username_11**: Fixied!(Thanks @username_9) for any one who is curious, here is the full syntax:`C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=e:\Bitcoin_Wallet`  
> **username_12**: How do I do this on a mac?  

---

### Answer by username_2 on 2018-03-19. Score: 2

# How do I move my Bitcoin Core data file

1. Safely exit Bitcoin Core (bitcoin-qt|bitcoind).
2. Make a new secure backup copy of your `wallet.dat`.
3. Move you entire .bitcoin folder to the new location, ***except** for `bitcoin.conf` which you **must** leave where it is in the existing .bitcoin folder.*
4. Edit `bitcoin.conf` to add `datadir={full path to new .bitcoin folder}`.
5. Start Bitcoin Core and check properly that everything is alright, your wallet is accessible and, balances correct, etc.
6. Protect your USB disk and make regular secure backup copies of your `wallet.dat`.

*The alternative if you also move your `bitcoin.conf` file is to find and edit every shortcut that starts any Bitcoin Core process wherever they may be (and any new ones you make) and add the following including every time you type it at the command line `-datadir={full path to new .bitcoin folder}`.*

Note: If storage space is an issue you can also enable the prune option; enter `prune={number=>551}` in your `bitcoin.conf`. The number is in MB.

*Appendix:* If you have to also move `bitcoin.conf` move the entire .bitcoin folder and create a symlink from ~/.bitcoin to /mnt/server/newlocation for example `ln -s /mnt/server/newlocation/.bitcoin ~/.bitcoin` - or start the bitcoin client/daemon with the -conf=<file> option every time e.g. `bitcoin-qt|bitcoind -conf=<file>` pointing to the new `bitcoin.conf` file location.

> **Comments:**
> **username_3**: @Wilitech Could you please elaborate the way to move bitcoin.conf, too?  

---

### Answer by username_4 on 2015-08-31. Score: 1

It seems several people are interested in how to create symbolic links in Windows. I know I was. This allows you to move your data directory to another hard drive without having to add the datadir flag.

It's actually not that much different.

To create a symbolic link (called a junction in Windows land) in Vista or later:

```
mklink /J <Link> <Target> 

```

Make sure the folder path that you use for the <Link> doesn't exist before creating.

(c:\<user>\AppData\Roaming\Bitcoin by default.)

Reference: [Wikipedia](https://en.wikipedia.org/wiki/NTFS_junction_point#Creating_or_deleting_a_junction_point)


---

### Answer by username_5 on 2014-08-31. Score: 1

Just FYI, you can use Windows based solution, create reparse point that point to another directory, just like symlink in Linux


---

### Answer by username_6 on 2014-05-15. Score: 0

That didn't quite work at first for me because some linux distros don't seem to like creating a symbolic link named “.bitcoin”.

I created a symbolic link named “test” in my home directory and then renamed that to “.bitcoin”

Using bitcoin-qt in Xubuntu12.04, this did not work:

```
ln -s /new/path/to/.bitcoin .bitcoin 

```

Did work:

* exited bitcoin-qt
* moved “.bitcoin” to another partition
* created a valid symbolic link to there named “test”

  ```
  ln -s /new/path/to/.bitcoin test

  ```
* renamed “test” to “.bitcoin”

> **Comments:**
> **username_7**: Could you please add some formatting and elaborate what you are referring to with "that"?  
> **username_8**: It's not the distribution that prevents symlinks from working, usually it relates to the filesystem or the expectation of the bitcoin software that directories, paths and other URI data operates as expected.  There are better solutions than symlinks, especially across multiple filesystem types.  
> **username_8**: Also, providing an answer for Linux when the OP clearly stated they were using Windows is pointless.  
> **username_0**: @username_7 +1 That is constructive.  
> **username_0**: @username_8 To be fair, having received the answer I was looking for, I'm not opposed to someone adding "I had the same problem on [linux] and here is how I solved it". That will add future value to someone. Unfortunately these instructions are barely coherent and lamenting "the instructions for [Windows] didn't work on my [Commodore 64]", no kidding.  

---

