If your hard drive crashes, or you move to a new computer, recovery is straightforward if you have your wallet.dat backup.
The location varies by operating system. Knowing this path is step one for any backup or recovery operation.
Windows (Most common):
C:\Users\[YourUserName]\AppData\Roaming\Bitcoin\
Note: AppData is a hidden folder. Type %APPDATA%\Bitcoin into File Explorer’s address bar to jump directly.
macOS:
~/Library/Application Support/Bitcoin/
Note: In Finder, click "Go" > "Go to Folder" and paste: ~/Library/Application Support/Bitcoin Bitcoin Core Wallet.dat
Linux (Ubuntu/Debian):
~/.bitcoin/
Note: The period means it is a hidden directory. Use ls -a in the terminal or enable "Show Hidden Files" in your file manager.
In recent versions of Bitcoin Core, you are prompted to create a 12 or 24-word seed phrase during setup.
Recommendation: Do both. Write down your seed phrase on metal (fire/waterproof) and store it in a safe. Additionally, keep an encrypted backup of wallet.dat on an offline drive for convenience. If your hard drive crashes, or you move
Because cryptocurrency is irreversible, hackers have perfected techniques to steal wallet.dat files. If a hacker gains access to your computer, they will search for this specific file.
One of the most misunderstood parts of Bitcoin Core is the keypool (default 1000 keys). When you request a “new address,” Bitcoin Core doesn’t generate a fresh key on the spot. It pulls the next unused key from the keypool.
Why? To allow robust backups: if you back up wallet.dat today, you can generate up to 1000 new addresses tomorrow and still recover funds sent to them from that old backup. Recommendation: Do both
Keypool management:
Without a keypool, a backup taken before generating an address would be useless for recovering funds sent to that address.
| Problem | Likely Cause | Solution |
|---|---|---|
| "Failed to load wallet" | Corrupted wallet.dat | Restore from latest backup |
| Wallet loads but balance missing | Outdated backup | Rescan: -rescan or -reindex |
| "Keypool exhausted" | Too many unused addresses generated | Backup after generating new addresses |
| Cannot unlock (wrong password) | Typo or lost passphrase | No solution – funds lost permanently |
| wallet.dat is zero bytes | Disk full or crash during write | Recover from backup |
| Do ✅ | Don't ❌ | |---|---| | Backup after every 100 transactions or new labels | Leave wallet.dat on cloud sync folders | | Store backups in 2+ physical locations | Email wallet.dat to yourself | | Encrypt wallet + encrypt backups separately | Forget your passphrase | | Test restore process annually | Use same wallet.dat across multiple running nodes | | Upgrade Bitcoin Core regularly | Delete old backups before testing |
If no backup exists: