<p>To answer the part about the stolen wallet, the thief would immediately transfer the balance of your stolen wallet into his own wallet, and repeat the process regularly.  So whenever you added more Bitcoins to your wallet, they would vanish as the thief stole them.  So you would be able to share the stolen wallet with the thief, but it would be a very unbalanced kind of sharing, where you did all the depositing and he did all the withdrawing.</p>

<p>You would be better off making a new wallet, transferring the Bitcoins out to the new wallet before the thief empties it, and never using any of the addresses from the old wallet as receiving addresses again.  This would involve giving new addresses to anyone or any site that stores an address of yours and is likely to ever send coins to it.</p>

CC BY-SA 3.0
2012-04-25T18:14:38.430Z
2012-04-25T18:14:38.430Z
Chris Moore
<p>This should work just fine, for the most part, though it's not recommended. What would not be fine is multiple PCs accessing the same wallet.dat from, say, dropbox at the same time. The BerkeleyDB format Bitcoin uses for its wallet is not intended to be a multi-user database and as such this can cause problems if both systems attempt an action at the same time.</p>

<p>It should also be noted that if you copy your wallet to a new system and make a transaction it can become out-of-sync with the old copy of the wallet, since Bitcoin generates new addresses to receive the "change" from each transaction by default.</p>

<p>In short, two systems using the same wallet can be done but it's not recommended because of the unexpected results it can produce. If you're simply talking about a backup/restore of the wallet.dat then that's much less troublesome.</p>

CC BY-SA 3.0
2012-04-27T09:22:55.967Z
@chris-moore says: "The wallet contains 100 pre-generated keys to simplify backups [...]. [...] you will need to synchronize the wallet files at least once every 100 transactions [...]." - This seems to imply that one address is "used" per transaction, which I don't understand since I may only use one address (or a few addresses) all the time. David Perry seems to clarify this a bit with ''[...] Bitcoin generates new addresses to receive the "change" from each transaction by default.'', but I don't understand this either. Could someone clarify?
mazi
CC BY-SA 3.0
2012-04-27T12:06:19.743Z
Bitcoin internally does not transfer amounts from address to address: transactions explicitly refer to old "coins" they consume, and create ones of arbitrary sizes. So, if you have a 10 BTC coin and want to pay me 7 BTC, the software will consume the 10 BTC coin, create two new coins from it (a 7 BTC one addressed to me, and a 3 BTC one addressed to yourself). To improve anonimity, the change goes back to a different address of yourself.
Pieter Wuille
CC BY-SA 3.0
2012-04-25T16:06:04.780Z
2012-04-25T16:06:04.780Z
David Perry
<p>A wallet is a combination of private keys, and transactions that spend from/to it.
Since somewhere in the 0.3 series, bitcoin will detect transactions from a key of yours that you did not create yourself, and count them as spends.</p>

<p>This means that if you duplicate your wallet on several machines, they will all be able to do spends, and observe spends by others. Probably as much as you would hope for, but there are a few caveats:</p>

<ul>
<li>The wallet contains 100 pre-generated keys to simplify backups, so the first 100 new keys used by both clients will remain the same, but afterwards they will diverge, i.e. start using different keys. You do not want this to happen, which means you will need to synchronize the wallet files at least once every 100 transactions (i.e., copy from one place to the other).</li>
<li>If one of the clients is not yet aware about a spend done by the other (for example, it was offline at the time of the transaction submit, and hasn't caught up with the block chain yet), it may produce a transaction that uses the same input, in other words: a double spend. The software is not able to deal with this, as it will consider its own transactions unquestionably valid. This will probably result in an unusable wallet.</li>
</ul>

<p>In short: there are some provisions for detecting spends by copy of a wallet, but it's certainly not an encouraged or supported use case.</p>

CC BY-SA 3.0
2012-04-26T12:45:49.407Z
Basically, my advice would be that you simply should not do this until the software has better support for it. You need at least a fully-deterministic generation of new accounts and some way to cleanly recover from transactions that are in the local wallet but invalid on the client's accepted blockchain.
David Schwartz
CC BY-SA 3.0
2012-04-25T16:08:26.960Z
2012-04-25T18:09:52.063Z
2012-04-25T18:09:52.063Z
Pieter Wuille
<p>Let's say I copy my wallet to another computer and start using it there. What happens? Can both computers send and receive payments to the same address(es) in the wallet?</p>

<p>A different scenario with the same results: someone steals my computer and starts using my wallet. I have a backup and start using that. Can we do it?</p>

<wallet><backup>
What happens when the same wallet (private key) is used on several machines?
mazi
# What happens when the same wallet (private key) is used on several machines?

(Asked by: username_0 on 2012-04-25)

Let's say I copy my wallet to another computer and start using it there. What happens? Can both computers send and receive payments to the same address(es) in the wallet?

A different scenario with the same results: someone steals my computer and starts using my wallet. I have a backup and start using that. Can we do it?

**Tags:** wallet, backup


---

## 3 answers

### Answer by username_3 on 2012-04-25. Score: 10 | Accepted answer

A wallet is a combination of private keys, and transactions that spend from/to it.
Since somewhere in the 0.3 series, bitcoin will detect transactions from a key of yours that you did not create yourself, and count them as spends.

This means that if you duplicate your wallet on several machines, they will all be able to do spends, and observe spends by others. Probably as much as you would hope for, but there are a few caveats:

* The wallet contains 100 pre-generated keys to simplify backups, so the first 100 new keys used by both clients will remain the same, but afterwards they will diverge, i.e. start using different keys. You do not want this to happen, which means you will need to synchronize the wallet files at least once every 100 transactions (i.e., copy from one place to the other).
* If one of the clients is not yet aware about a spend done by the other (for example, it was offline at the time of the transaction submit, and hasn't caught up with the block chain yet), it may produce a transaction that uses the same input, in other words: a double spend. The software is not able to deal with this, as it will consider its own transactions unquestionably valid. This will probably result in an unusable wallet.

In short: there are some provisions for detecting spends by copy of a wallet, but it's certainly not an encouraged or supported use case.

> **Comments:**
> **username_4**: Basically, my advice would be that you simply should not do this until the software has better support for it. You need at least a fully-deterministic generation of new accounts and some way to cleanly recover from transactions that are in the local wallet but invalid on the client's accepted blockchain.  

---

### Answer by username_1 on 2012-04-25. Score: 5

To answer the part about the stolen wallet, the thief would immediately transfer the balance of your stolen wallet into his own wallet, and repeat the process regularly. So whenever you added more Bitcoins to your wallet, they would vanish as the thief stole them. So you would be able to share the stolen wallet with the thief, but it would be a very unbalanced kind of sharing, where you did all the depositing and he did all the withdrawing.

You would be better off making a new wallet, transferring the Bitcoins out to the new wallet before the thief empties it, and never using any of the addresses from the old wallet as receiving addresses again. This would involve giving new addresses to anyone or any site that stores an address of yours and is likely to ever send coins to it.


---

### Answer by username_2 on 2012-04-25. Score: 3

This should work just fine, for the most part, though it's not recommended. What would not be fine is multiple PCs accessing the same wallet.dat from, say, dropbox at the same time. The BerkeleyDB format Bitcoin uses for its wallet is not intended to be a multi-user database and as such this can cause problems if both systems attempt an action at the same time.

It should also be noted that if you copy your wallet to a new system and make a transaction it can become out-of-sync with the old copy of the wallet, since Bitcoin generates new addresses to receive the "change" from each transaction by default.

In short, two systems using the same wallet can be done but it's not recommended because of the unexpected results it can produce. If you're simply talking about a backup/restore of the wallet.dat then that's much less troublesome.

> **Comments:**
> **username_0**: @username_1-username_1 says: "The wallet contains 100 pre-generated keys to simplify backups [...]. [...] you will need to synchronize the wallet files at least once every 100 transactions [...]." - This seems to imply that one address is "used" per transaction, which I don't understand since I may only use one address (or a few addresses) all the time. username_2 username_2 seems to clarify this a bit with ''[...] Bitcoin generates new addresses to receive the "change" from each transaction by default.'', but I don't understand this either. Could someone clarify?  
> **username_3**: Bitcoin internally does not transfer amounts from address to address: transactions explicitly refer to old "coins" they consume, and create ones of arbitrary sizes. So, if you have a 10 BTC coin and want to pay me 7 BTC, the software will consume the 10 BTC coin, create two new coins from it (a 7 BTC one addressed to me, and a 3 BTC one addressed to yourself). To improve anonimity, the change goes back to a different address of yourself.  

---

