Skip to main content
The data directory is the default location where Bitcoin Core stores all blockchain data, wallet files, configuration, and other runtime files.

Data Directory Location

Default Paths

The default data directory varies by operating system:

Custom Data Directory

You can specify a custom data directory using the -datadir option:

Chain-Specific Directories

All content except bitcoin.conf is chain-specific. The actual data directory path differs based on the network:
When using testnet, your data is stored in a testnet3/ subdirectory, not at the root of the data directory.

Directory Structure

Root Directory Files

file
User-defined configuration settings. Not written by the software, must be created manually.Location: <datadir>/bitcoin.conf
file
Dynamic settings set through GUI or RPC interfaces. Created automatically unless disabled with -nosettings.Location: <datadir>/settings.json
file
Debug information and general logging. Can be configured with -debuglogfile option.Location: <datadir>/debug.log
file
Process ID file. Created at start, deleted on shutdown.Location: <datadir>/bitcoind.pid
Session RPC authentication cookie. Created at start if used, deleted on shutdown.Location: <datadir>/.cookie
file
Data directory lock file to prevent multiple instances.Location: <datadir>/.lock

Network and Peer Files

file
Peer IP address database in custom format.Location: <datadir>/peers.dat
file
Anchor IP address database. Created on shutdown, deleted at startup. Contains last known outgoing block-relay-only peers.Location: <datadir>/anchors.dat
file
Stores the addresses/subnets of banned nodes.Location: <datadir>/banlist.json

Mempool and Fee Estimation

file
Dump of the mempool’s transactions. Saved on shutdown if -persistmempool=1.Location: <datadir>/mempool.dat
file
Statistics used to estimate minimum transaction fees required for confirmation.Location: <datadir>/fee_estimates.dat

Privacy Network Keys

file
Cached Tor v3 onion service private key for -listenonion option.Location: <datadir>/onion_v3_private_key
file
Private key for I2P address. Used when -i2psam= is specified. Auto-generated if it doesn’t exist.Location: <datadir>/i2p_private_key

Blockchain Data Directories

blocks/

Contains all blockchain block data. Can be relocated with -blocksdir option.
file
Actual Bitcoin blocks in network format. NNNNN is a 5-digit number (e.g., blk00000.dat). Each file is up to 128 MiB.Location: <datadir>/blocks/blk*.dat
file
Block undo data in custom format. Used to disconnect blocks during reorg.Location: <datadir>/blocks/rev*.dat
file
Rolling XOR pattern for block and undo data files (obfuscation layer).Location: <datadir>/blocks/xor.dat
directory
LevelDB database containing block index. Not affected by -blocksdir option.Location: <datadir>/blocks/index/

chainstate/

directory
LevelDB database containing blockchain state. This is a compact representation of all currently unspent transaction outputs (UTXOs) and metadata.Location: <datadir>/chainstate/

Optional Indexes

These directories only exist if the corresponding index is enabled.

Transaction Index

directory
LevelDB database for transaction index. Created when -txindex=1 is set.Location: <datadir>/indexes/txindex/

Transaction Spender Index

directory
LevelDB database for transaction output spender index. Created when -txospenderindex=1 is set.Location: <datadir>/indexes/txospenderindex/

Block Filter Index

directory
LevelDB database for basic block filters. Created when -blockfilterindex=basic is set.Location: <datadir>/indexes/blockfilter/basic/db/
file
Block filter data files for basic filtertype.Location: <datadir>/indexes/blockfilter/basic/fltr*.dat

Coin Stats Index

directory
LevelDB database for coin statistics index. Created when -coinstatsindex=1 is set.Location: <datadir>/indexes/coinstatsindex/db/

Wallet Directory

Multi-Wallet Environment

directory
Contains wallet files. Can be relocated with -walletdir option. If the directory doesn’t exist, wallets reside in the data directory root.Location: <datadir>/wallets/
Wallet files are SQLite databases (as of recent versions):
  • Named wallets: wallets/<wallet_name>/wallet.dat
  • Default wallet: wallets/wallet.dat

SQLite Wallet Files

file
Personal wallet database containing keys and transactions (SQLite format).Location: <datadir>/wallets/<name>/wallet.dat
file
SQLite rollback journal file. Created during transactions. Must be kept as safe as wallet.dat.Location: <datadir>/wallets/<name>/wallet.dat-journal
wallet.dat files must not be shared across different node instances. This can result in key-reuse and double-spends due to lack of synchronization.
Always use the backupwallet RPC command to back up wallets. This ensures the wallet is properly locked and updated before copying.

GUI Settings

file
Backup of former GUI settings after -resetguisettings option is used.Location: <datadir>/guisettings.ini.bak
bitcoin-qt uses Qt’s QSettings class for GUI preferences. Settings location is platform-specific:
  • Linux: ~/.config/Bitcoin/Bitcoin-Qt.conf
  • macOS: ~/Library/Preferences/org.bitcoin.Bitcoin-Qt.plist
  • Windows: Registry or %APPDATA%\Bitcoin\

Storage Requirements

Full Node (Non-Pruned)

As of 2026, a full archival node requires:
  • Blockchain data: ~600+ GB (growing continuously)
  • chainstate: ~10-15 GB
  • Transaction index: ~50-100 GB (if enabled)
  • Total: ~650-750+ GB

Pruned Node

With pruning enabled:
  • Minimum: 550 MB (blocks) + ~10 GB (chainstate) = ~11 GB
  • Custom: Specified size + chainstate
Pruned nodes cannot serve historical blocks to other peers and cannot use -txindex.

Legacy Files and Directories

These are no longer used by current Bitcoin Core versions:

Filesystem Recommendations

On macOS, avoid using the exFAT filesystem for the data directory or blocks directory. Multiple reports indicate database corruption and data loss with this filesystem. See Bitcoin Core Issue #31454.
Recommended filesystems:
  • Linux: ext4, XFS, Btrfs
  • macOS: APFS, HFS+
  • Windows: NTFS

Best Practices

Separate Volumes

For better performance and management:

Backup Strategy

  1. Configuration: Back up bitcoin.conf
  2. Wallets: Use backupwallet RPC command regularly
  3. Blockchain: No backup needed (can be re-downloaded)
  4. Optional: Back up fee_estimates.dat for faster startup

Monitoring Disk Usage

File Permissions

Ensure proper file permissions to protect sensitive data:

See Also