0

I'm building bitcoin from source to add some functionality. The main reason is that I want to use AWS S3 to store my wallet.dat file (for security reasons) instead of being stored locally. Basically, I want all the references to the wallet directory and file to be through aws-cli, instead of directly on the machine. I'd be thankful for any suggestions.

Running on ubuntu 16.04 (EC2), headless.

Thanks!

1

You'd have to rewrite the relevant pieces of the Bitcoin Core source code to do this directly. It'll be particularly challenging because access to wallet.dat is not done directly, but through the bdb library, so you'd have to hack that as well.

Probably a better approach would be to have a script that periodically backs up the wallet.dat file to your s3 bucket. However, you'll have to temporarily shut down Bitcoin Core to do that, because if you copy wallet.dat while it's being written to, you might get an inconsistent copy that doesn't work.

I'm not sure of the best tools these days for interacting with the s3 API. s3cmd is one option, though I've had issues recently with it not working, which I haven't unraveled yet.

  • Thaks mate! Yeah, I already tinkered with it and wrote a script to backup wallet.dat periodically (with aws-cli, was pretty straghtforward to be fair). What I'm trying to achieve here is securing wallet.dat completely by removing it from the bitcoin server and using amazon's security measures by having it stay in a bucket. In any case, thanks a lot for the reply, you gave me some food for thought :) – Dan Zlotnikov Jan 28 at 9:37
  • @DanZlotnikov: The amount of security this adds seems limited, since the API key will need to be somewhere on the server. So an attacker who gets access to the server can get the key and retrieve the file. I suppose it might help avoid some attacks where they only get limited access to the server. – Nate Eldredge Jan 28 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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