<p>Maybe do:</p>

<p>1.) Move to current <code>wallet.dat</code> to a different location (will result in creating a fresh wallet)</p>

<p>2.) Start bitcoind/qt with <code>-keypool=1</code> (if you want to avoid keypools)</p>

<p>3.) Call <code>getnewaddress</code></p>

<p>You might also consider using a hardware wallet.</p>

CC BY-SA 3.0
2016-09-14T08:48:52.363Z
2016-09-14T08:48:52.363Z
Jonas Schnelli
<p>Yes it grabs from the <code>keypool</code> which is a security/back-up feature so that you have future addresses private keys stored. </p>

<p>I guess I don't understand your problem, why don't you want it to pull from the <code>keypool</code> exactly? I suppose you could change your <code>bitcoin.conf</code> to <code>keypool=1</code> or some other small number, and then generate new addresses. That way your newly generated address will be a new one that is not from the previously existing key pool.  But again I'm not sure what purpose this would serve. The new keys will be saved to your wallet either way, whether your have <code>keypool=1</code> or <code>keypool=1000</code>.</p>

CC BY-SA 3.0
2016-08-15T10:08:45.680Z
This does not work with HD wallets, as of bitcoin core 0.13
user2084795
CC BY-SA 3.0
2016-08-15T10:10:12.477Z
Also, you can not reduce the keypool by setting `keypool=1` (You actually need to drain it by calling `getnewaddress` repeatedly)
user2084795
CC BY-SA 3.0
2016-07-16T05:18:04.933Z
2016-07-16T05:18:04.933Z
m1xolyd1an
<p>you need to use multiple wallet.dat files.
create multiple wallet.dat files from file > backup wallet, after encrypting each wallet from settings > encrypt wallet
create as below example :
savings-wallet-1.dat
savings-wallet-2.dat
spending-wallet-1.dat </p>

<p>and so on...</p>

<p>on linux :
replace ~/.bitcoin/wallet.dat with the one you wish to use for your current session</p>

CC BY-SA 3.0
2017-12-27T11:09:32.633Z
2017-12-27T11:09:32.633Z
mrtechmaker
<p>I have a wallet on an offline computer, which has too many backups on connected computers. </p>

<p>I would like to generate a totally new bitcoin address on the offline computer, and use it as a cold storage address. I will then sign an offline transaction from the wallet to that new address and be safe.</p>

<p><strong>How can I create a new Bitcoin private key from the Bitcoin CLI, without using any existing wallet keys / addresses?</strong></p>

<p>I've looked into <a href="https://bitcoin.org/en/developer-reference#getnewaddress" rel="nofollow">getnewaddress</a>, but it seems to be getting the keys from the keypool on the existing wallet.</p>

<p>Note - I know I can use bitaddress.org offline, but I would like to use the basic bitcoin-core tools for this one.</p>

CC BY-SA 3.0
2016-07-15T13:40:14.930Z
pybitcointools' CLI random_key function perhaps?
hartmut
CC BY-SA 3.0
2016-07-16T01:25:59.393Z
@hartmut Thanks! Nice option, but I'd rather use bitcoin-core.
Adam Matan
<bitcoin-core><private-key><bitcoin-cli>
CLI: Generate a new private key, unrelated to any existing wallet
Adam Matan
# CLI: Generate a new private key, unrelated to any existing wallet

(Asked by: username_0 on 2016-07-15)

I have a wallet on an offline computer, which has too many backups on connected computers.

I would like to generate a totally new bitcoin address on the offline computer, and use it as a cold storage address. I will then sign an offline transaction from the wallet to that new address and be safe.

**How can I create a new Bitcoin private key from the Bitcoin CLI, without using any existing wallet keys / addresses?**

I've looked into [getnewaddress](https://bitcoin.org/en/developer-reference#getnewaddress), but it seems to be getting the keys from the keypool on the existing wallet.

Note - I know I can use bitaddress.org offline, but I would like to use the basic bitcoin-core tools for this one.

**Tags:** bitcoin-core, private-key, bitcoin-cli

> **Comments:**
> **username_1**: pybitcointools' CLI random_key function perhaps?  
> **username_0**: @username_1 Thanks! Nice option, but I'd rather use bitcoin-core.  

---

## 3 answers

### Answer by username_2 on 2016-09-14. Score: 2 | Accepted answer

Maybe do:

1.) Move to current `wallet.dat` to a different location (will result in creating a fresh wallet)

2.) Start bitcoind/qt with `-keypool=1` (if you want to avoid keypools)

3.) Call `getnewaddress`

You might also consider using a hardware wallet.


---

### Answer by username_3 on 2016-07-16. Score: 0

Yes it grabs from the `keypool` which is a security/back-up feature so that you have future addresses private keys stored.

I guess I don't understand your problem, why don't you want it to pull from the `keypool` exactly? I suppose you could change your `bitcoin.conf` to `keypool=1` or some other small number, and then generate new addresses. That way your newly generated address will be a new one that is not from the previously existing key pool. But again I'm not sure what purpose this would serve. The new keys will be saved to your wallet either way, whether your have `keypool=1` or `keypool=1000`.

> **Comments:**
> **username_4**: This does not work with HD wallets, as of bitcoin core 0.13  
> **username_4**: Also, you can not reduce the keypool by setting `keypool=1` (You actually need to drain it by calling `getnewaddress` repeatedly)  

---

### Answer by username_5 on 2017-12-27. Score: 0

you need to use multiple wallet.dat files.
create multiple wallet.dat files from file > backup wallet, after encrypting each wallet from settings > encrypt wallet
create as below example :
savings-wallet-1.dat
savings-wallet-2.dat
spending-wallet-1.dat

and so on...

on linux :
replace ~/.bitcoin/wallet.dat with the one you wish to use for your current session


---

