How to run a bitcoind on a hosting securely? 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?
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 &amp; be more secure.