1

I'm developing a web site which should receive bitcoins and display the amount of received coins. As this is my first bitcoin experience I would like to know if the following scheme is secure enough:

I'm planning to run a web server and bitcoind with the encrypted wallet on a hosted server in a datacenter. No payments will be made through this bitcoind so the wallet will be locked all time and just will be used to monitor the transactions. The front end will communicate to bitcoind by JSON-RPC. There will be regular backups of the encrypted wallet file.

The payments will only be done from another machine which has a copy of the wallet and is secure (both physically and from IT side).

Will this work?

3
  • 2
    If the server doesn't need the private keys, why store them there? You could just keep the addresses so you can monitor incoming payments and then you are even safer. Commented May 1, 2013 at 23:04
  • @gsp92 Thank you very much for your input. Can you point me to a reference where I can read how to separate private and public key and make a wallet with public keys only? Commented May 2, 2013 at 8:03
  • I have very limited knowledge of bitcoind, and my suggestion is a little long for a comment so I will post it as an answer. Stand by. Commented May 2, 2013 at 13:50

2 Answers 2

2

As I mentioned in the comment above, unless you absolutely need your private key to be on the server, I would recommend only storing the address for checking purposes.

I've never used bitcoind before, but the best solution I have seen for accepting bitcoin payments would be to use something like bitaddress.org to generate a huge number of address and private key combos. Upload the addresses into a database on your server, and then when a customer goes through a transaction your server can select a brand new (never before used) key for them to pay to. Then you can use a bitcoin API like the one provided by Blockchain to validate that the correct number of bitcoins have been sent to this address, and once it confirms, you can release the product to the client.

Then, at your leisure sometime in the future, you can collect your Bitcoins from the addresses having received payments.

This method presents a number of distinct advantages IMO:

1) Private keys are never on the server, you are considerably less vulnerable to an attack.

2) No requirement to keep the entire blockchain on your server, saving space and bandwidth.

3) Funds from each client are held separately (initially) so if you had multiple sales in a short time period, you can still identify each separately (if you used one central wallet, you run the risk of confusing the payments)

4) Your central wallet is slightly safer - the client no longer pays directly to it. Important to note that this makes very little difference because they'd still need your private key, but peace of mind is nice.

I appreciate that this isn't quite the solution you were asking for, but I think it may still fit your usage case & be more secure.

1

If you are implementing the web server in Python, you can look at this BitcoinTalk post where the creator of one of the first Bitcoin Faucets, freebitcoins.appspot.com, shares his implementation.

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.