<p>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. </p>

<p>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. </p>

CC BY-SA 3.0
2013-05-10T22:54:39.960Z
Thanks for your input unfortunately there are severe security issues with blockchain.info see https://bitcointalk.org/index.php?topic=199965.0
Alexey Kalmykov
CC BY-SA 3.0
2013-05-10T23:07:06.513Z
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.
George Pearce
CC BY-SA 3.0
2013-05-11T09:18:00.640Z
Ah, got your idea. Thanks for the detailed answer!
Alexey Kalmykov
CC BY-SA 3.0
2013-05-10T22:37:24.693Z
2013-05-10T22:37:24.693Z
George Pearce
<p>Commands can be entered after opening Window -&gt; Console
in Bitcoin Core</p>
<p>Create a new empty wallet with</p>
<p><code>createwallet 'wallet_name' true</code></p>
<p><a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/createwallet/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/createwallet/</a></p>
<p>Then use</p>
<p><code>importmulti</code> command with &quot;watchonly&quot;: true</p>
<p><a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importmulti/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importmulti/</a></p>

CC BY-SA 4.0
2020-11-28T13:36:56.027Z
2020-11-28T13:36:56.027Z
Fuji
<p>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?</p>

CC BY-SA 3.0
2013-05-12T03:10:57.193Z
possible duplicate of [how to monitor +20,000 addresses for new received transactions?](http://bitcoin.stackexchange.com/questions/4496/how-to-monitor-20-000-addresses-for-new-received-transactions)
Stephen Gornick
CC BY-SA 4.0
2020-11-28T13:31:05.630Z
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
Fuji
<private-key><public-key><wallet.dat>
How to remove private keys from wallet.dat and create "receive only" wallet?
Alexey Kalmykov
# How to remove private keys from wallet.dat and create "receive only" wallet?

(Asked by: username_0 on 2013-05-10)

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?

**Tags:** private-key, public-key, wallet.dat

> **Comments:**
> **username_1**: possible duplicate of [how to monitor +20,000 addresses for new received transactions?](http://bitcoin.stackexchange.com/questions/4496/how-to-monitor-20-000-addresses-for-new-received-transactions)  
> **username_2**: 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  

---

## 2 answers

### Answer by username_3 on 2013-05-10. Score: 3

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.

> **Comments:**
> **username_0**: Thanks for your input unfortunately there are severe security issues with blockchain.info see https://bitcointalk.org/index.php?topic=199965.0  
> **username_3**: 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.  
> **username_0**: Ah, got your idea. Thanks for the detailed answer!  

---

### Answer by username_2 on 2020-11-28. Score: 1

Commands can be entered after opening Window -> Console
in Bitcoin Core

Create a new empty wallet with

`createwallet 'wallet_name' true`

<https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/createwallet/>

Then use

`importmulti` command with "watchonly": true

<https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importmulti/>


---

