Difference between revisions of "Data directory"

From Bitcoin Wiki
Jump to: navigation, search
(Files: Add peers.dat and mark addr.dat as being for versions prior to v0.7.0.)
(Add References section.)
Line 67: Line 67:
* [[Securing your wallet]]
* [[Securing your wallet]]
<references />

Revision as of 07:03, 21 October 2012

The location where Bitcoin's data files are stored, including the wallet data file.

Default Location


Go to Start -> Run (or press WinKey+R) and run this:

explorer %APPDATA%\Bitcoin

Bitcoin's data folder will open. For most users, this is the following locations:

C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)

C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)

"AppData" and "Application data" are hidden by default.


By default Bitcoin will put its data here:


You need to do a "ls -a" to see directories that start with a dot.

If that's not it, you can do a search like this:

find / -name wallet.dat -print 2>/dev/null


By default Bitcoin will put its data here:

~/Library/Application Support/Bitcoin/

Directory Contents


  • database
    • Contains journaling files for the block database
  • testnet
    • Contains testnet versions of these files (if running with -testnet)


  • .lock
    • BDB lock file
  • bitcoin.conf [optional]
  • blkxxxx.dat
    • Contains concatenated raw blocks
  • blkindex.dat
    • Indexing information used with blkxxxx.dat
  • __db.xxx
    • Used by BDB
  • db.log
  • debug.log
    • Bitcoin's verbose log file. Automatically trimmed from time to time.
  • wallet.dat
    • Storage for keys, transactions, metadata, and options. Please be sure to make backups of this file. It contains the keys necessary for spending your bitcoins.
  • addr.dat [Versions prior to v0.7.0]
    • Storage for ip addresses to make a reconnect easier
  • peers.dat [Versions v0.7.0 and later]
    • Storage for peer information to make a reconnect easier. This file uses a bitcoin-specific file format, unrelated to any database system<ref>[1]<ref>.

The data, index and log files are used by Oracle Berkeley DB, the embedded key/value data store that Bitcoin uses.

See Also