A Monero user starts their daemon, and the wallet fails to sync. The software reports database errors, corrupted LMDB files, or missing key images. The funds are not lost—they exist on the blockchain—but access to them depends on recovering wallet metadata or repairing the local database. Understanding where wallet data lives, how corruption happens, and which recovery steps are reversible can mean the difference between a minor inconvenience and a permanent fund loss.
Monero wallet recovery differs fundamentally from simply installing new software. The wallet stores private spend and view keys in encrypted `.keys` files, address history in `.address` files, and transaction data in an LMDB database. Each of these can degrade independently. A corrupted database does not necessarily destroy keys. A missing `.keys` file does not necessarily mean the funds are gone if the recovery seed was backed up separately. The practical recovery path depends on identifying what is actually damaged and which backups or recovery methods remain available.

Understanding Monero wallet file structure and corruption points
A Monero wallet created through the CLI or GUI generates several essential files. The `.keys` file contains the encrypted private spend key and private view key. The `.address` file stores the public address and subaddresses. The wallet also maintains an LMDB database—a transactional key-value store that indexes transactions, outputs, key images, and metadata. This database accelerates syncing and balance queries but is also the most fragile component because it depends on consistent writes and proper shutdown.
Corruption typically occurs during unexpected power loss, forced shutdown, drive filling to capacity, or hardware failure. If the daemon is force-killed while writing LMDB data, the database can enter an inconsistent state. Files on disk may appear intact but contain partially written transactions or orphaned index entries. The wallet may report a balance but fail to spend because key image data is missing or contradictory. In some cases, the database can be repaired. In others, only a rescan from blockchain data will restore accuracy.
The recovery hierarchy is important. If the `.keys` file is intact and readable, funds can always be recovered by rescanning the blockchain, even if the LMDB database is completely destroyed. If the `.keys` file is corrupted but the recovery seed is available, a new wallet can be created and the same funds will be accessible. Only when both the wallet files and the recovery seed are lost, or when the recovery seed itself is incorrect or incomplete, does permanent loss occur. For most users, one of these backups exists somewhere.
Step 1: Backup and assess before attempting repair
Before running any recovery or repair command, copy the entire wallet directory to a separate location. This serves as a reference if repair attempts make the situation worse. The wallet directory typically lives in `~/.bitmonero/` on Linux, `%APPDATA%\Roaming\bitmonero\` on Windows, or `~/Library/Application Support/monero/` on macOS. Copy the whole folder, not just individual files.
Next, attempt a clean start. Shut down the daemon completely, rename the LMDB directory (for example, from `lmdb` to `lmdb.old`), and restart the daemon. The wallet will begin rebuilding the database from the blockchain. This works if the `.keys` and `.address` files are intact. If the rebuild completes and balances are correct, the original database was simply corrupted and rescan fixed it. If the rebuild fails or reports errors, corruption extends beyond the database alone.
Check the `.keys` and `.address` files for readability. These files are encrypted, so they should not be human-readable. If they appear as gibberish (random bytes), encryption is intact. If they appear as partial text or are suspiciously small (less than 100 bytes), they may be corrupted. A corrupted `.keys` file means the CLI or GUI cannot decrypt the keys, but the recovery seed is still the path forward.
Step 2: Testing recovery from seed phrase
If the wallet files are damaged but the recovery seed is available, create a test wallet on a separate machine or in a separate directory. Use the monero-wallet-cli with the `–restore-deterministic-wallet` option, or use any supported wallet interface. For monero wallet download options and setup instructions, detailed guides cover the CLI and GUI installation, but the core principle is the same: the recovery seed deterministically regenerates the private keys.
Restore the wallet and let it fully sync. Check the balance. If it matches what was in the corrupted wallet, the seed is valid and funds are accessible. This confirms that even if the original files must be abandoned, no permanent loss has occurred. The original machine or wallet application may no longer work, but a fresh monero wallet download from an authoritative source will access the same funds.
The recovery seed itself may be vulnerable if it was stored insecurely. If the device holding the seed was compromised, or if the seed was exposed online, the funds may have been moved by an attacker. Always verify the balance in a restored wallet before assuming recovery is complete. A zero balance after restoring from seed is a warning sign that the keys may have been compromised.
Step 3: LMDB database repair using monero-blockchain-blackball
The Monero Project includes a tool called `monero-blockchain-blackball` designed to audit and repair LMDB database integrity. This tool scans the blockchain and rebuilds key image information, which tracks whether outputs have been spent. If the key image database is corrupted but the `.keys` file is intact, running blackball can restore consistency without losing transaction history.
The procedure is to shut down the daemon, run `monero-blockchain-blackball` with the wallet database path, and let it complete. The tool is computationally intensive and may take several hours. Progress is printed to the terminal. Once finished, restart the daemon. The wallet should now recognize all outputs correctly and be able to spend them. The LMDB database remains in the same location but with repaired key image records.
An important caveat: `monero-blockchain-blackball` fixes consistency between the database and the blockchain, not corrupted key files. If the problem is a missing or damaged `.keys` file, blackball cannot help. It is also not a magic recovery tool for every possible database error. Some LMDB corruption, particularly in the transaction index or output metadata, may not be repairable by this tool. If blackball runs without error but the wallet still reports problems, the issue may require a full rescan instead.
Step 4: Full rescan and blockchain synchronization from scratch
If repair attempts fail or if the database is too damaged to fix in place, a full rescan rebuilds the wallet’s transaction history from the blockchain. This requires keeping the `.keys` file intact, deleting the LMDB database, and restarting the daemon. The daemon re-indexes the entire blockchain, querying every output against the wallet’s public view key to identify owned outputs. This is slower than a normal sync but restores complete accuracy.
The rescan process can take hours or days depending on blockchain height and hardware speed. CPU usage is moderate but sustained. Drive I/O is heavy, so avoid running other intensive tasks. Once the rescan completes, the wallet will report balances and transaction history as if the database was never corrupted. All funds are accessible and spendable. The LMDB database is rebuilt correctly.
A rescan does not require internet connectivity to be consistent. It only needs access to the blockchain data. If you are running a full node locally, the rescan uses that local data. If you are using a remote node, the rescan queries the remote, trusting its responses. The tradeoff is that a local rescan is private (no view key data sent to a third party) but slower, while a remote rescan is faster but reveals the wallet’s viewing pattern to the remote node operator.
Recovery scenarios where full restoration is impossible
A recovery is impossible if the recovery seed is unknown and the `.keys` file cannot be read by any version of Monero software. In this case, no wallet on any machine can access the funds because the private keys cannot be derived. This is rare but can happen if a device containing the only copy of both the keys and seed is physically destroyed, or if encryption keys to the wallet files were lost.
Another impossible scenario is when the recovery seed is available but incorrect. A misremembered or partially transcribed seed will generate a different set of private keys and will not access the original funds. A one-character error in a 25-word seed typically produces a completely different wallet with zero balance. If you restore a wallet and the balance is zero, verify the seed word-by-word rather than assuming the seed is wrong immediately—the funds might be in a different subaddress index or on a different network fork if an unusual node configuration is in use.
Hardware failure can also create unrecoverable situations if the wallet files are encrypted with a password and the password is not documented. Even if the drive is recovered, the files cannot be decrypted without the correct passphrase. This is why documenting recovery procedures—seed, passphrase, and wallet file location—is critical. A user who loses the passphrase but retained the recovery seed can still create a new wallet, though the funds will appear as spent on the old wallet path and cannot be recovered into a new one if the old wallet’s view key is unknown.
Avoiding corruption and maintaining wallet health
Corruption prevention is easier than recovery. Always shut down the daemon cleanly rather than force-killing the process. In the CLI, use the `exit` command. In the GUI, click the close button and wait for the daemon to stop. A proper shutdown flushes all database writes to disk and leaves the LMDB in a consistent state. Unexpected power loss is the most common cause of corruption in otherwise well-maintained systems, so consider using an uninterruptible power supply if the machine is mission-critical.
Back up the wallet directory regularly. A copy of the `.keys` file and `.address` file to an external drive or encrypted cloud storage ensures that even if the machine is destroyed, the wallet can be restored on any other computer running Monero. The recovery seed should be stored separately, ideally offline, because it is the ultimate fallback. If both the local wallet files and the recovery seed are backed up in different locations, recovery is always possible unless the seed itself is compromised.
Keep Monero software updated. The official Monero Project regularly releases patches that improve database handling and fix edge-case bugs that can cause corruption. Running an outdated wallet on a system with limited storage or under heavy load increases corruption risk. Even if no features are needed from a new release, updating ensures that known instability is fixed.
Regulatory and security context for wallet recovery
Wallet recovery techniques also have regulatory implications. Monero’s privacy features, including ring signatures and stealth addresses, mean that recovering a wallet does not automatically reveal transaction history to third parties. However, EU anti-money laundering regulations are moving toward stricter requirements for privacy coins, with a ban on trading Monero effective July 2027 in some jurisdictions. Users in affected regions should understand the timeline and plan accordingly.
From a security perspective, any recovery process that involves moving funds to a new wallet should use authenticated software. A compromised monero wallet download from an untrusted source can steal keys during recovery. Always verify checksums and signatures of downloaded binaries, and only download from the official Monero Project website or trusted mirrors. Similarly, when testing recovery seeds on a fresh machine, ensure that machine has no malware or network surveillance active.
When to involve external help and what to avoid
If recovery steps do not work and the balance is significant, professional data recovery for the wallet files may be worth the cost. A specialized firm can potentially read damaged LMDB files or recover deleted files if they have not been overwritten. This is expensive (typically hundreds to thousands of dollars) but may be justified if the alternative is total loss. Never share wallet files, recovery seeds, or passphrases with a support technician unless the firm is well-established and the communication is encrypted and authenticated.
Avoid online wallet recovery services that claim to repair files or restore balances. These are almost always scams designed to steal the wallet files or recovery seed. Legitimate recovery requires only the wallet files and software running on your own machine or a trusted professional’s isolated environment. If a service asks for the recovery seed or offers to upload files to their server, stop immediately and assume it is malicious.
Community forums and subreddits dedicated to Monero can provide guidance on recovery steps, but verify any commands or procedures against the official documentation. Copy-pasting commands from untrusted sources can accidentally delete files or expose keys. If unsure, test recovery procedures in a virtual machine or isolated environment first.
Frequently asked questions
Can I recover Monero funds if my wallet database is corrupted?
Yes, in most cases. If the `.keys` file is intact, you can perform a full rescan by deleting the LMDB database and restarting the daemon. If the `.keys` file is also damaged but the recovery seed is available, create a new wallet from the seed on any machine using a trusted monero wallet download. The recovery seed regenerates the same private keys and will access the same funds.
What is the difference between using monero-blockchain-blackball and a full rescan?
monero-blockchain-blackball repairs key image data in an existing LMDB database without deleting it, which is faster if the database is mostly intact. A full rescan deletes the database and rebuilds it from scratch, which is slower but works even if blackball repair fails. Use blackball first; if it does not resolve the issue, perform a rescan.
Is my recovery seed enough to access my funds if everything else is lost?
Yes. As long as you have the correct recovery seed and access to Monero software, you can restore your wallet on any machine and access all funds associated with that seed. Download Monero software from the official source, use the restore option, and sync the wallet. The private keys are deterministically derived from the seed, so the same seed always produces the same wallet.
What should I do if my recovery seed does not restore the expected balance?
First, double-check the seed for transcription errors. Verify each word against your written backup. If the seed is correct, the wallet may be restoring at a different height or using a different subaddress index. Try explicitly specifying the restore height (the block height where the wallet was created) or check if the funds are in a subaddress rather than the main address. If the balance remains zero and the seed is correct, the original private keys may have been compromised.