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?


4 Answers 4


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.


Symlink the wallet.dat file into the truecrypt volume


A solution has been discussed, but not implemented: - http://github.com/bitcoin/bitcoin/issues/68 https://github.com/bitcoin/bitcoin/pull/287

  • Hmm, it appears I'm actually already following that issue.
    – ripper234
    Jan 15, 2012 at 8:40

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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