<p>A <code>wallet.dat</code> file will be created only when you decide to create a wallet.</p>
<ul>
<li>Since <a href="https://bitcoincore.org/en/releases/0.21.0/" rel="nofollow noreferrer">Bitcoin Core 0.21.0</a> (released in January 2021), no default wallet is created anymore.</li>
<li>This follows a change in <a href="https://bitcoincore.org/en/releases/0.15.0/" rel="nofollow noreferrer">Bitcoin Core 0.15.0</a> (released in September 2017) to support multiple loaded wallet simultaneously. Since then, it has no longer been the case that wallet files are necessarily called <code>wallet.dat</code>; they can have any name.</li>
<li>The ability to create new wallets through the RPC interface was added in <a href="https://bitcoincore.org/en/releases/0.17.0/" rel="nofollow noreferrer">Bitcoin Core 0.17.0</a> (released in October 2018), through the <code>createwallet</code> command.</li>
</ul>

CC BY-SA 4.0
2024-12-06T16:29:10.003Z
I'm not sure to have seen the actual .dat file, probably only the (empty?) wallets folder. Could it be that bitcoind only creates that folder when it can't find a .bitcoin folder? I left it in place, to keep my .conf file, for my rpc credentials. Will the folder be created when I create a wallet with bitcoin-cli?
tihe
CC BY-SA 4.0
2024-12-06T16:06:25.637Z
2024-12-06T16:12:02.573Z
2024-12-06T16:12:02.573Z
Pieter Wuille
<p>I had to kill bitcoind, then deleted my datadir and restarted bitcoind. I assumed it would recreate and resync everything, which it did, except for the (empty) wallet.dat.</p>
<p>What I did was delete the separate datadir, empty the .bitcoin folder, except for the bitcoin.conf file containing my rpc credentials. I tried twice, the second time orderly stopping and restarting bitcoind, but without a new wallet.dat recreated.</p>
<p>What should I do get a new wallet.dat, preferably through a fresh restart (to avoid carrying over any file corruptions as a consequence of unorderly killing the daemon process)?</p>

<bitcoind><wallet.dat>
How can I have bitcoind recreate my wallet.dat?
tihe
# How can I have bitcoind recreate my wallet.dat?

(Asked by: username_0 on 2024-12-06)

I had to kill bitcoind, then deleted my datadir and restarted bitcoind. I assumed it would recreate and resync everything, which it did, except for the (empty) wallet.dat.

What I did was delete the separate datadir, empty the .bitcoin folder, except for the bitcoin.conf file containing my rpc credentials. I tried twice, the second time orderly stopping and restarting bitcoind, but without a new wallet.dat recreated.

What should I do get a new wallet.dat, preferably through a fresh restart (to avoid carrying over any file corruptions as a consequence of unorderly killing the daemon process)?

**Tags:** bitcoind, wallet.dat


---

## 1 answers

### Answer by username_1 on 2024-12-06. Score: 2 | Accepted answer

A `wallet.dat` file will be created only when you decide to create a wallet.

* Since [Bitcoin Core 0.21.0](https://bitcoincore.org/en/releases/0.21.0/) (released in January 2021), no default wallet is created anymore.
* This follows a change in [Bitcoin Core 0.15.0](https://bitcoincore.org/en/releases/0.15.0/) (released in September 2017) to support multiple loaded wallet simultaneously. Since then, it has no longer been the case that wallet files are necessarily called `wallet.dat`; they can have any name.
* The ability to create new wallets through the RPC interface was added in [Bitcoin Core 0.17.0](https://bitcoincore.org/en/releases/0.17.0/) (released in October 2018), through the `createwallet` command.

> **Comments:**
> **username_0**: I'm not sure to have seen the actual .dat file, probably only the (empty?) wallets folder. Could it be that bitcoind only creates that folder when it can't find a .bitcoin folder? I left it in place, to keep my .conf file, for my rpc credentials. Will the folder be created when I create a wallet with bitcoin-cli?  

---

