Is there a way to change the wallet.dat location without changing the entire data directory?

9

2

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.

David Perry

Posted 2012-04-19T22:04:38.877

Reputation: 13 848

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?.

Peter Mortensen 2014-08-01T12:49:30.420

Answers

3

A symlink will do it on Linux.

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

A -walletdir= feature has been requested before:

Stephen Gornick

Posted 2012-04-19T22:04:38.877

Reputation: 26 118

+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 2012-04-20T03:22:04.253

1That's fantastic, how did I not know Win7 had symlinks?!David Perry 2012-04-20T16:31:27.083

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

MCCCS

Posted 2012-04-19T22:04:38.877

Reputation: 5 827