Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The default setup on Linux/Ubuntu has Bitcoin storing the data in the ~/.bitcoin folder, which is usually not encrypted with TrueCrypt.

Suppose I do now want to rely on the internal Bitcoin encryption system, but instead want to save the wallet to disk on using TrueCrypt encryption. Currently, I have a separate TrueCrypt data file, that I mount to a partition, copy files from it to ~/.bitcoin, and when I'm finished, I copy the files back to the truecrypt volume, and shred+delete the copies on ~/.bitcoin.

This is bothersome and error prone.

Can I configure Bitcoin to only take the wallet from /media/trucrypt, but keep the blockchain data in ~/.bitcoin?

share|improve this question
I haven't tried, but maybe you could copy once to /media/trucrypt and then bind mount to ~/.bitcoin with mount -B /media/trucrypt ~/.bitcoin? – snapfractalpop Nov 17 '12 at 23:39
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?. Possible duplicate of Bitcoin-Qt setup: Change block-chain file location, settings? documentation?. – Peter Mortensen Aug 1 '14 at 12:44
up vote 4 down vote accepted

The bitcoin startup argument -datadir=<dir> allows you to specify a data directory, including the wallet file.

That'll still require you to pass a custom argument I'm afraid. The config file is also in the data dir, hence there's a chicken-and-the-egg problem that makes it impossible to configure up ahead. Unless you're savvy enough to change the default constant in the source and recompile, which might be okay since you're already running Linux.

share|improve this answer

Symlink the wallet.dat file into the truecrypt volume

share|improve this answer
+1. That's certainly the easiest way to achieve this. – Nate Eldredge Aug 20 '14 at 22:17

A solution has been discussed, but not implemented: -

share|improve this answer
Hmm, it appears I'm actually already following that issue. – ripper234 Jan 15 '12 at 8:40

Maybe this can help you, it seems quite easy to do:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.