Data Directory Location
Default Paths
The default data directory varies by operating system:| Platform | Default Path |
|---|---|
| Linux | ~/.bitcoin/ |
| macOS | ~/Library/Application Support/Bitcoin/ |
| Windows | %LOCALAPPDATA%\Bitcoin\ |
Custom Data Directory
You can specify a custom data directory using the-datadir option:
Chain-Specific Directories
All content exceptbitcoin.conf is chain-specific. The actual data directory path differs based on the network:
| Chain Option | Subdirectory Path |
|---|---|
-chain=main (default) | <datadir>/ |
-chain=test or -testnet | <datadir>/testnet3/ |
-chain=testnet4 or -testnet4 | <datadir>/testnet4/ |
-chain=signet or -signet | <datadir>/signet/ |
-chain=regtest or -regtest | <datadir>/regtest/ |
When using testnet, your data is stored in a
testnet3/ subdirectory, not at the root of the data directory.Directory Structure
Root Directory Files
User-defined configuration settings. Not written by the software, must be created manually.Location:
<datadir>/bitcoin.confDynamic settings set through GUI or RPC interfaces. Created automatically unless disabled with
-nosettings.Location: <datadir>/settings.jsonDebug information and general logging. Can be configured with
-debuglogfile option.Location: <datadir>/debug.logProcess ID file. Created at start, deleted on shutdown.Location:
<datadir>/bitcoind.pidSession RPC authentication cookie. Created at start if used, deleted on shutdown.Location:
<datadir>/.cookieData directory lock file to prevent multiple instances.Location:
<datadir>/.lockNetwork and Peer Files
Peer IP address database in custom format.Location:
<datadir>/peers.datAnchor IP address database. Created on shutdown, deleted at startup. Contains last known outgoing block-relay-only peers.Location:
<datadir>/anchors.datStores the addresses/subnets of banned nodes.Location:
<datadir>/banlist.jsonMempool and Fee Estimation
Dump of the mempool’s transactions. Saved on shutdown if
-persistmempool=1.Location: <datadir>/mempool.datStatistics used to estimate minimum transaction fees required for confirmation.Location:
<datadir>/fee_estimates.datPrivacy Network Keys
Cached Tor v3 onion service private key for
-listenonion option.Location: <datadir>/onion_v3_private_keyPrivate key for I2P address. Used when
-i2psam= is specified. Auto-generated if it doesn’t exist.Location: <datadir>/i2p_private_keyBlockchain Data Directories
blocks/
Contains all blockchain block data. Can be relocated with-blocksdir option.
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*.datBlock undo data in custom format. Used to disconnect blocks during reorg.Location:
<datadir>/blocks/rev*.datRolling XOR pattern for block and undo data files (obfuscation layer).Location:
<datadir>/blocks/xor.datLevelDB database containing block index. Not affected by
-blocksdir option.Location: <datadir>/blocks/index/chainstate/
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
LevelDB database for transaction index. Created when
-txindex=1 is set.Location: <datadir>/indexes/txindex/Transaction Spender Index
LevelDB database for transaction output spender index. Created when
-txospenderindex=1 is set.Location: <datadir>/indexes/txospenderindex/Block Filter Index
LevelDB database for basic block filters. Created when
-blockfilterindex=basic is set.Location: <datadir>/indexes/blockfilter/basic/db/Block filter data files for basic filtertype.Location:
<datadir>/indexes/blockfilter/basic/fltr*.datCoin Stats Index
LevelDB database for coin statistics index. Created when
-coinstatsindex=1 is set.Location: <datadir>/indexes/coinstatsindex/db/Wallet Directory
Multi-Wallet Environment
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/- Named wallets:
wallets/<wallet_name>/wallet.dat - Default wallet:
wallets/wallet.dat
SQLite Wallet Files
Personal wallet database containing keys and transactions (SQLite format).Location:
<datadir>/wallets/<name>/wallet.datSQLite rollback journal file. Created during transactions. Must be kept as safe as
wallet.dat.Location: <datadir>/wallets/<name>/wallet.dat-journalAlways use the
backupwallet RPC command to back up wallets. This ensures the wallet is properly locked and updated before copying.GUI Settings
Backup of former GUI settings after
-resetguisettings option is used.Location: <datadir>/guisettings.ini.bakbitcoin-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:| Path | Replaced By | Last Used |
|---|---|---|
banlist.dat | banlist.json | v22.0 |
blktree/ | blocks/index/ | v0.8.0 |
coins/ | chainstate/ | v0.8.0 |
blkindex.dat | Multiple files | v0.8.0 |
blk000?.dat | blkNNNNN.dat | v0.8.0 |
addr.dat | peers.dat | v0.7.0 |
onion_private_key | onion_v3_private_key | v0.21.0 |
database/ (BDB) | SQLite wallets | v23.0+ |
Filesystem Recommendations
Recommended filesystems:- Linux: ext4, XFS, Btrfs
- macOS: APFS, HFS+
- Windows: NTFS
Best Practices
Separate Volumes
For better performance and management:Backup Strategy
- Configuration: Back up
bitcoin.conf - Wallets: Use
backupwalletRPC command regularly - Blockchain: No backup needed (can be re-downloaded)
- Optional: Back up
fee_estimates.datfor faster startup
Monitoring Disk Usage
File Permissions
See Also
- bitcoin.conf Configuration File - Configuration file format and options
- Command-Line Options - All available command-line arguments