<p>For safety and integrity reasons, the wallet file must be held within the datadir. You can choose a different file with <code>-wallet=&lt;file&gt;</code> (config or startup argument). But only a filename not a path.
Don't try to share your wallet between multiple bitcoin-core instances. </p>

<p>What you really want to do is <strong>multisig</strong>.</p>

<p>You could have a bip32 watch-only wallet with a 2of2 multisig (you can watch the funds, but not spend/sign).
With additional hardware wallets (like an USB stick), something like Trezor or <a href="http://digitalbitbox.com" rel="nofollow">digitalbitbox.com</a> you could – in theory – sing the desired transaction and therefore complete it and make it ready for broadcasting.</p>

<p>But, unfortunately, it's not possible with current version of bitcoin-core without entering the RPC world and also patching and self-compiling bitcoin-core. </p>

CC BY-SA 3.0
2015-07-28T14:48:15.140Z
I don't understand most of what those words mean, but that seems to be a lot of complexity for the equivalent of passing a credit card around... I'll do my homework and get back :)
Loupax
CC BY-SA 3.0
2015-07-28T14:51:47.120Z
Agreed. Bitcoin is still in a early stage and there are a lot of people working towards the direction to make such things easy to use.
Jonas Schnelli
CC BY-SA 3.0
2015-07-29T06:56:01.943Z
Looks like the entire "keep a shared blockchain and wallet separate" ordeal is more trouble than it's worth. Will get an external hard drive that will contain everything needed and see how that works
Loupax
CC BY-SA 3.0
2015-07-30T13:36:25.650Z
Hardisk (or USB stick big enough to hold everything, 64GB or preferably 128GB) sounds better. Just make sure everyone properly closes bitcoin-qt and safely eject the device before they unplug it.
Jannes
CC BY-SA 3.0
2015-07-28T13:53:43.697Z
2015-07-28T13:53:43.697Z
Jonas Schnelli
<p>I am trying to implement bitcoin payments for the project I'm currently working on, and I need to create a bitcoin wallet that should be inside a USB stick. This USB stick should be at the hands of the project manager, and every developer that wants to make test bitcoin payments should ask for the USB, plug it on their computer, make a payment with that wallet and return it. Since this wallet will be filled with company money for testing purposes, we can't just use our personal wallets.</p>

<p>What I want to do, is having the blockchain in a shared folder in the network, in a place that it's accessible by all dev machines, and at the same time having a single wallet in the USB stick that should be usable by everyone.</p>

<p>So my questions are:</p>

<ol>
<li>Is this even possible?</li>
<li>I know that I can set the data directory on Bitcoin Core with the <code>datadir="/data/directory/whatever"</code> but for this to work, I'll propably need an external hard drive instead of a usb stick since this also points to the location of the blockchain. Can I somehow set the wallet folder separately from the blockchain folder?</li>
<li>If bitcoin-core doesn't make it, is there any other client that allows this to happen without having to use an external service?</li>
</ol>

CC BY-SA 3.0
2015-07-28T12:45:44.367Z
Your plan sounds confusing and dangerous. Opening the same blockchain data files from multiple PCs (on the network) will probably quickly corrupt the files. Also running around with a USB key with money on it? (only playmoney in your case, for now...) At the very least you're increasing the risk of exposure to malware, loss, breakage and file corruption because of improper unmounting. And how are you planning on making regular backups of that USB stick?
Jannes
CC BY-SA 3.0
2015-07-28T13:09:50.920Z
I don't really know how the blockchain synchronization works, so if it's not safe to use a shared blockchain, we'll just have to deal with keeping multiple instances. 

Now on the "usb stick is bad" argument. What we want is a single wallet that can change hands inside the department. Are there any ways to do it? It's not as much of a deal as it sounds since it will never contain the equivalent of 10-20 Euros in bitcoin. It doesn't seem less safe than passing your physical wallet around... Are there any alternatives to that?
Loupax
CC BY-SA 3.0
2015-07-29T09:41:12.553Z
Could you use [Testnet](https://en.bitcoin.it/wiki/Testnet) coins for the same purpose? Since they are worthless, every developer could handle their own stash.
Murch
CC BY-SA 3.0
2015-08-07T07:06:01.107Z
I sent an email to the payment provider we are working with. If they start accepting Testnet coins it will be a big step forward, but until then we don't even have a test sandbox :/
Loupax
CC BY-SA 3.0
2015-10-12T16:32:07.780Z
@Murch after a lot of nagging, the payment service provided implemented a sandbox environment that uses Testnet coins. Yay
Loupax
<bitcoin-core><shared><datadir>
Is it possible to have my blockchain on a different folder than that of my wallet files?
Loupax
# Is it possible to have my blockchain on a different folder than that of my wallet files?

(Asked by: username_0 on 2015-07-28)

I am trying to implement bitcoin payments for the project I'm currently working on, and I need to create a bitcoin wallet that should be inside a USB stick. This USB stick should be at the hands of the project manager, and every developer that wants to make test bitcoin payments should ask for the USB, plug it on their computer, make a payment with that wallet and return it. Since this wallet will be filled with company money for testing purposes, we can't just use our personal wallets.

What I want to do, is having the blockchain in a shared folder in the network, in a place that it's accessible by all dev machines, and at the same time having a single wallet in the USB stick that should be usable by everyone.

So my questions are:

1. Is this even possible?
2. I know that I can set the data directory on Bitcoin Core with the `datadir="/data/directory/whatever"` but for this to work, I'll propably need an external hard drive instead of a usb stick since this also points to the location of the blockchain. Can I somehow set the wallet folder separately from the blockchain folder?
3. If bitcoin-core doesn't make it, is there any other client that allows this to happen without having to use an external service?

**Tags:** bitcoin-core, shared, datadir

> **Comments:**
> **username_1**: Your plan sounds confusing and dangerous. Opening the same blockchain data files from multiple PCs (on the network) will probably quickly corrupt the files. Also running around with a USB key with money on it? (only playmoney in your case, for now...) At the very least you're increasing the risk of exposure to malware, loss, breakage and file corruption because of improper unmounting. And how are you planning on making regular backups of that USB stick?  
> **username_0**: I don't really know how the blockchain synchronization works, so if it's not safe to use a shared blockchain, we'll just have to deal with keeping multiple instances.   Now on the "usb stick is bad" argument. What we want is a single wallet that can change hands inside the department. Are there any ways to do it? It's not as much of a deal as it sounds since it will never contain the equivalent of 10-20 Euros in bitcoin. It doesn't seem less safe than passing your physical wallet around... Are there any alternatives to that?  
> **username_2**: Could you use [Testnet](https://en.bitcoin.it/wiki/Testnet) coins for the same purpose? Since they are worthless, every developer could handle their own stash.  
> **username_0**: I sent an email to the payment provider we are working with. If they start accepting Testnet coins it will be a big step forward, but until then we don't even have a test sandbox :/  
> **username_0**: @username_2 after a lot of nagging, the payment service provided implemented a sandbox environment that uses Testnet coins. Yay  

---

## 1 answers

### Answer by username_3 on 2015-07-28. Score: 2

For safety and integrity reasons, the wallet file must be held within the datadir. You can choose a different file with `-wallet=<file>` (config or startup argument). But only a filename not a path.
Don't try to share your wallet between multiple bitcoin-core instances.

What you really want to do is **multisig**.

You could have a bip32 watch-only wallet with a 2of2 multisig (you can watch the funds, but not spend/sign).
With additional hardware wallets (like an USB stick), something like Trezor or [digitalbitbox.com](http://digitalbitbox.com) you could – in theory – sing the desired transaction and therefore complete it and make it ready for broadcasting.

But, unfortunately, it's not possible with current version of bitcoin-core without entering the RPC world and also patching and self-compiling bitcoin-core.

> **Comments:**
> **username_0**: I don't understand most of what those words mean, but that seems to be a lot of complexity for the equivalent of passing a credit card around... I'll do my homework and get back :)  
> **username_3**: Agreed. Bitcoin is still in a early stage and there are a lot of people working towards the direction to make such things easy to use.  
> **username_0**: Looks like the entire "keep a shared blockchain and wallet separate" ordeal is more trouble than it's worth. Will get an external hard drive that will contain everything needed and see how that works  
> **username_1**: Hardisk (or USB stick big enough to hold everything, 64GB or preferably 128GB) sounds better. Just make sure everyone properly closes bitcoin-qt and safely eject the device before they unplug it.  

---

