<p>Your private key is stored in your wallet. This is the critical piece of information that will allow you to use this address in the future.
Encrypting the wallet have having a backup of wallet.dat are important steps. </p>

<p>But, you can even store you keys completely offline.<br>
Even on a computer that has never been connected to the network. </p>

<ul>
<li>Create a new address with:<code>bitcoin-cli getnewaddress ""</code>  </li>
<li>List all the addresses of account "" with:
<code>bitcoin-cli getaddressesbyaccount ""</code></li>
<li>You can now print the private key of an address<br>
<code>bitcoin-cli dumpprivkey &lt;BITCOIN_ADDRESS&gt;</code>  </li>
</ul>

<p>If your wallet is encrypted, you have to unlock it first.</p>

<p>The result of this command will be your private key. You can copy it to a piece of paper and put it somewhere you can safely store it.  </p>

<p>You can add it to a wallet in the future. Following this wiki:
<a href="https://en.bitcoin.it/wiki/How_to_import_private_keys" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/How_to_import_private_keys</a></p>

<p>Using the bitcoin-cli you need to run (After unlocking your wallet):<br>
<code>bitcoin-cli importprivkey "&lt;YOUR_PRIVATE_KEY&gt;" "" false</code></p>

<p>The false at the end is to prevent a rescan of the blockchain. </p>

CC BY-SA 3.0
2017-10-08T14:48:27.927Z
2017-10-08T15:26:11.617Z
2017-10-08T15:26:11.617Z
amanusk
<p>If you are running bitcoin core daemon on the server, it will have a wallet.dat which you can encrypt (with the <code>encryptwallet</code> command), containing the private keys. So then you can just back up that wallet file, and your private keys will be safe as long as you have the backup and the decryption key for the wallet</p>

CC BY-SA 3.0
2017-09-08T05:25:06.787Z
2017-09-08T05:25:06.787Z
meshcollider
<p>I want to store my bitcoins into a server into a datacenter and access it via SSH/VNC.</p>

<p>The problem here is:</p>

<p>If the hard drive gets destroyed/fails/gets problems, how do I recover my bitcoins?</p>

<p>A friend of mine said that I must have an encrypted backup of the private key.</p>

<p>What private key? How do I do all of this if I'm gonna use a Centos/Debian OS for the server and the Bitcoin core client?</p>

<p>Thank you!</p>

<bitcoin-core><wallet><private-key><hardware-wallet>
Hard drive failure
user59496
# Hard drive failure

(Asked by: username_0 on 2017-09-08)

I want to store my bitcoins into a server into a datacenter and access it via SSH/VNC.

The problem here is:

If the hard drive gets destroyed/fails/gets problems, how do I recover my bitcoins?

A friend of mine said that I must have an encrypted backup of the private key.

What private key? How do I do all of this if I'm gonna use a Centos/Debian OS for the server and the Bitcoin core client?

Thank you!

**Tags:** bitcoin-core, wallet, private-key, hardware-wallet


---

## 2 answers

### Answer by username_1 on 2017-10-08. Score: 1

Your private key is stored in your wallet. This is the critical piece of information that will allow you to use this address in the future.
Encrypting the wallet have having a backup of wallet.dat are important steps.

But, you can even store you keys completely offline.  
Even on a computer that has never been connected to the network.

* Create a new address with:`bitcoin-cli getnewaddress ""`
* List all the addresses of account "" with:
  `bitcoin-cli getaddressesbyaccount ""`
* You can now print the private key of an address  
  `bitcoin-cli dumpprivkey <BITCOIN_ADDRESS>`

If your wallet is encrypted, you have to unlock it first.

The result of this command will be your private key. You can copy it to a piece of paper and put it somewhere you can safely store it.

You can add it to a wallet in the future. Following this wiki:
<https://en.bitcoin.it/wiki/How_to_import_private_keys>

Using the bitcoin-cli you need to run (After unlocking your wallet):  
`bitcoin-cli importprivkey "<YOUR_PRIVATE_KEY>" "" false`

The false at the end is to prevent a rescan of the blockchain.


---

### Answer by username_2 on 2017-09-08. Score: 1

If you are running bitcoin core daemon on the server, it will have a wallet.dat which you can encrypt (with the `encryptwallet` command), containing the private keys. So then you can just back up that wallet file, and your private keys will be safe as long as you have the backup and the decryption key for the wallet


---

