<p>The next Bitcoin Core release will have <code>-walletdir</code>, which'll basicly allow you to do it without requiring tricks.</p>

<p><a href="https://github.com/bitcoin/bitcoin/commit/0530ba0eae147563921b162ed05347234d8b53c0" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/commit/0530ba0eae147563921b162ed05347234d8b53c0</a></p>

<p><a href="https://github.com/bitcoin/bitcoin/pull/11466" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/pull/11466</a></p>

CC BY-SA 3.0
2017-12-15T16:06:00.587Z
2017-12-15T16:06:00.587Z
MCCCS
<p>A symlink will do it on Linux.</p>

<p>On Windows there's a symbolic link method as well:</p>

<ul>
<li><a href="http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link" rel="nofollow">http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link</a></li>
</ul>

<p>A -walletdir= feature has been requested before:</p>

<ul>
<li><a href="http://bitcointalk.org/?topic=2730.0" rel="nofollow">http://bitcointalk.org/?topic=2730.0</a></li>
<li><a href="https://github.com/bitcoin/bitcoin/issues/68" rel="nofollow">https://github.com/bitcoin/bitcoin/issues/68</a></li>
</ul>

CC BY-SA 3.0
2012-04-20T03:22:04.253Z
+1 That's what I do. But sometimes the symlink gets clobbered (fortunately, just the link, not the wallet): https://github.com/bitcoin/bitcoin/issues/660
Thilo
CC BY-SA 3.0
2012-04-20T16:31:27.083Z
That's fantastic, how did I not know Win7 had symlinks?!
David Perry
CC BY-SA 3.0
2012-04-20T00:23:41.830Z
2012-04-22T00:11:00.297Z
2012-04-22T00:11:00.297Z
Stephen Gornick
<p>I know that Bitcoin supports the <code>-datadir</code> command line option which specifies that the wallet.dat and blockchain should be stored in a custom location rather than <code>%appdata%\roaming\bitcoin</code> but is there a way to specify a wallet location without also changing the blockchain location? I have a highly secured spot I'd like to stash my wallet.dat in (permanently) but I don't want to stash ~2GB of blockchain data alongside it.</p>

CC BY-SA 3.0
2014-08-01T12:49:30.420Z
Not an exact duplicate, but asking about how to change the default storage location has been posted many, many times. The future canonical question is probably *[Bitcoin-Qt setup: Change block-chain file location, settings? documentation?](http://bitcoin.stackexchange.com/questions/9259)*.
Peter Mortensen
<wallet><blockchain><bitcoind><bitcoin-core>
Is there a way to change the wallet.dat location without changing the entire data directory?
David Perry
# Is there a way to change the wallet.dat location without changing the entire data directory?

(Asked by: username_0 on 2012-04-19)

I know that Bitcoin supports the `-datadir` command line option which specifies that the wallet.dat and blockchain should be stored in a custom location rather than `%appdata%\roaming\bitcoin` but is there a way to specify a wallet location without also changing the blockchain location? I have a highly secured spot I'd like to stash my wallet.dat in (permanently) but I don't want to stash ~2GB of blockchain data alongside it.

**Tags:** wallet, blockchain, bitcoind, bitcoin-core

> **Comments:**
> **username_1**: Not an exact duplicate, but asking about how to change the default storage location has been posted many, many times. The future canonical question is probably *[Bitcoin-Qt setup: Change block-chain file location, settings? documentation?](http://bitcoin.stackexchange.com/questions/9259)*.  

---

## 2 answers

### Answer by username_3 on 2012-04-20. Score: 3 | Accepted answer

A symlink will do it on Linux.

On Windows there's a symbolic link method as well:

* <http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link>

A -walletdir= feature has been requested before:

* <http://bitcointalk.org/?topic=2730.0>
* <https://github.com/bitcoin/bitcoin/issues/68>

> **Comments:**
> **username_4**: +1 That's what I do. But sometimes the symlink gets clobbered (fortunately, just the link, not the wallet): https://github.com/bitcoin/bitcoin/issues/660  
> **username_0**: That's fantastic, how did I not know Win7 had symlinks?!  

---

### Answer by username_2 on 2017-12-15. Score: 0

The next Bitcoin Core release will have `-walletdir`, which'll basicly allow you to do it without requiring tricks.

<https://github.com/bitcoin/bitcoin/commit/0530ba0eae147563921b162ed05347234d8b53c0>

<https://github.com/bitcoin/bitcoin/pull/11466>


---

