I want to create a wallet for monitoring incoming transactions. So it should be receive only wallet that will be place on hosting, that is potentially not secure. If I understand it well, this won't allow attacker to stole funds if server is compromised. How I can create such a wallet with only public keys? And can I inject private keys later to spend from that wallet from a secure machine?
possible duplicate of how to monitor +20,000 addresses for new received transactions?– Stephen GornickMay 12, 2013 at 3:10
7 years old and still no answer. I get "Keys can only be imported to the keypool when private keys are disabled" when trying to add a public key and google took me to this page with no answers– FujiNov 28, 2020 at 13:31
You're right, storing your private keys on a server is a bad idea - it means you're liable to lose all of your funds in the case of a hack.
But as you aren't storing them, do you need to install the bitcoin daemon on your server? You could use an API from one of the online blockchains to monitor transactions from your server, and maintain your encrypted wallet.dat on your own computer.
Thanks for your input unfortunately there are severe security issues with blockchain.info see bitcointalk.org/index.php?topic=199965.0 May 10, 2013 at 22:54
I'm not suggesting you use blockchain.info or one of their wallets - I'm suggesting you use the API of a blockchain website (there are a bunch of them, blockexporer.com being one) and store the addresses on your server. That way, when you are expecting a payment, you can run an API call, check whether a payment has been made to an address and voila. The private keys never touch the network so completely safe. Regardless of perceived blockchain.info wallet insecurities, their API is solid and if you cross-check with another API then you should be good. May 10, 2013 at 23:07
1Ah, got your idea. Thanks for the detailed answer! May 11, 2013 at 9:18
Commands can be entered after opening Window -> Console in Bitcoin Core
Create a new empty wallet with
createwallet 'wallet_name' true
importmulti command with "watchonly": true