Chia Key Backup: How to Automate Backups and Master Key Management

10 min read

Photorealistic glowing green digital vault with a Chia leaf logo and 24 floating seed words in a holographic overlay, symbolizing secure Chia Key backup storage against a dark blockchain-themed background.
  • Your 24-word mnemonic seed phrase is the only supported way to recover your Chia wallet — no exceptions.
  • Running the command chia keys show --show-mnemonic-seed in the CLI reveals your full seed phrase for immediate backup.
  • A paper backup stored offline is your most reliable first line of defense against losing access to your XCH.
  • The keyring.yaml file, stored at ~/.chia_keys/keyring.yaml, holds your encrypted keys and can be moved between Chia installations.
  • A two-key setup — one key for farming, one for cold storage — separates your farming operations from your wallet, reducing theft risk significantly.
  • Automating database and config file backups saves days of re-syncing if your node fails or your drive dies.

A proper chia key backup means securing your 24-word mnemonic seed phrase offline and keeping secondary copies of your database and config files. Lose that seed phrase, and your XCH is gone permanently — no recovery service, no support ticket, and no workaround exists.

Why Your Chia Key Backup Is the Most Critical Step in Farming

Most Chia farmers spend hours tweaking their plotting setup, optimizing drive space, and monitoring reward frequency. Very few spend 15 minutes on their key backup. That is a dangerous trade-off. The Chia blockchain uses a cryptographic key system where your 24-word mnemonic seed phrase is the starting point for everything — your private keys, your wallet addresses, your farming identity, and your ability to spend or receive XCH.

Every asset you hold on the Chia network — from XCH farming rewards to Chia-based stablecoins — is ultimately controlled by this seed phrase. If you are also exploring assets like on-chain collateralized stablecoins on Chia, that same seed phrase protects those holdings too. A single missed backup step can cost you everything.

What the 24-Word Mnemonic Actually Controls

Chia uses BLS-12-381 private keys, following the IETF spec and EIP-2333 key derivation standard.[3] Your 24-word mnemonic is not just a password — it is the source of entropy used to generate your master private key. From that master key, Chia derives child keys for your wallet, your farmer, and your pool. Every wallet address you have ever received XCH to can be regenerated from those 24 words alone.[3] This means you do not need to back up individual addresses or transaction histories — just the mnemonic itself. The BLS master private key is stored in your operating system’s keychain, but the 24-word phrase is what makes recovery possible on any machine, anywhere.

What You Stand to Lose Without a Proper Backup

The Chia documentation is unambiguous on this point: copying a keychain from one system to another is not a supported recovery method. The only supported method of wallet recovery is the 24-word seed phrase.[3] Copying the ~/.chia/mainnet/ folder to a new machine will not restore your keys if the original machine is gone. Keys live in the keyring and mnemonic — not in the mainnet folder. If your computer fails, gets stolen, or has a software conflict and you do not have the 24 words written down, your XCH is unrecoverable. No one at Chia Network, no developer, and no blockchain explorer can restore it for you.

Your 24-word mnemonic seed phrase is the only path to wallet recovery. Back it up before you do anything else with your Chia setup.

How to View Your Chia Key Backup Mnemonic Right Now

If you have Chia installed and running but never wrote down your seed phrase, do it now. Both the CLI and the GUI give you access to your mnemonic. Either method works, but the CLI is more reliable across all operating systems and versions.

CLI Method — The Most Reliable Option

Open your terminal (Linux/macOS) or PowerShell (Windows) and run this single command:[4]

chia keys show --show-mnemonic-seed

This displays your fingerprint, master public key, farmer public key, pool public key, first wallet address, master private key, and your 24-word mnemonic seed phrase.[4] Write down each word in exact order — the order matters completely. Number them 1 through 24 as you write. When you are done, run the command a second time to verify your written copy is accurate word for word. Then close the terminal. Do not leave this output visible on screen longer than necessary.

GUI Method — The Visual Option

In the Chia desktop application, navigate to the Keys section. Select your active key and look for the option to view the recovery phrase or mnemonic. The GUI presents the same 24 words you would see in the CLI, organized in a numbered grid to make copying them easier. This method works well for users who are less comfortable with the command line, but note that the CLI method gives you additional key information (master private key, fingerprint) that can be useful for advanced setups.

Your SituationWhat to Do FirstPriority Level
New Chia install, no backup yetRun chia keys show --show-mnemonic-seed and write down 24 words🔴 Urgent — do this now
Already have the 24 words on paperSet a passphrase on your keyring.yaml for local protection🟡 High
Running a farming rig 24/7Implement a two-key setup (farming key + cold storage key)🟡 High
Want to avoid days of re-syncing after disk failureSchedule automated backups of db/ and wallet/db/ folders🟢 Recommended
Moving to a new machineImport keys using chia keys add and optionally copy DB folders🟢 As needed

The Three Chia Key Backup Methods That Actually Protect Your XCH

A reliable chia key backup strategy layers multiple methods. Relying on just one copy, especially a digital one, creates a single point of failure. Here are the three most practical options ranked from simplest to most advanced.

Paper Backup — Your Non-Negotiable Offline Foundation

Writing your 24 words on paper and storing them offline is the most fundamental chia key backup method and the one Chia Network recommends first.[1] Use a pen and write clearly, numbering each word. Do not type them into your phone, email them to yourself, or save them in a notes app. Paper stored in a fireproof safe, a safety deposit box, or another physically secure location gives you recovery capability even if every piece of hardware you own is destroyed or stolen. The weakness of paper is fire, water, and physical loss — which is why combining it with a second method is smart.

Encrypted USB Drive — The Digital Cold Storage Option

For a second copy, create a plain text file containing your 24 words, encrypt it using a trusted offline tool, and save it to a USB drive dedicated to this purpose. Keep that USB drive disconnected from the internet at all times. Never store the unencrypted seed phrase in a file on any internet-connected machine. The critical step here is encryption before the file is ever created on the drive — not encryption applied afterward. This method pairs well with the paper backup: paper for immediate emergency access, encrypted USB for a more portable and water-resistant digital copy.

keyring.yaml File with Passphrase Protection

Modern versions of Chia store your keys in a keyring.yaml file located at ~/.chia_keys/keyring.yaml on macOS and Linux, or %HOMEDRIVE%%HOMEPATH%/.chia_keys/keyring.yaml on Windows.[2] This file encrypts your keys using ChaCha20-Poly1305 authenticated encryption, with the encryption key derived from your passphrase using PBKDF2 with SHA-256.[2] The practical benefit is that you can move this file between Chia installations without re-entering your 24-word mnemonic each time. To enable passphrase protection, run chia passphrase set from the CLI. Keep your passphrase stored separately from the keyring file itself — never in the same location.

Important: Chia cannot help you recover a forgotten keyring passphrase. If you forget it, your recovery path is your 24-word mnemonic.[2] This reinforces why the paper backup always comes first.

Secondary Chia Backups You Should Not Skip

While the 24-word mnemonic is your essential chia key backup, two additional backups will save you significant time and frustration when rebuilding after a hardware failure.

Backing Up Your Blockchain and Wallet Databases

The Chia blockchain database lives at ~/.chia/mainnet/db/ and the wallet database at ~/.chia/mainnet/wallet/db/. These files are large and grow over time, but copying them to a backup drive means that after a reinstall, you can restore them to those same paths and skip the full blockchain sync. Without this backup, a fresh Chia install must download and verify the entire Chia blockchain from scratch, which can take one to several days depending on your internet connection and hardware. These database files do not contain your private keys — they are just the blockchain and wallet transaction history. That means they are safe to back up to an external drive or even a NAS device on your local network.

config.yaml — Your Farming Settings File

Your config.yaml file, found at ~/.chia/mainnet/config/config.yaml, stores all of your farming configuration — including your reward target addresses, pool settings, and node preferences.[1] If you have a two-key setup where farming rewards go to a cold storage wallet address, this file is where that address is stored. Losing it means manually reconfiguring everything from scratch. Backing it up takes seconds and saves you from hunting down settings you may not remember. Copy it to the same location as your database backup and update it whenever you make significant changes to your farming setup.

Advanced Key Management: The Two-Key Farming Setup

The default Chia configuration uses one key for everything — plotting, farming, wallet, and receiving rewards. This is simple, but it means your wallet is on the same machine as your farming node. If that machine is ever compromised, an attacker could access your wallet and steal your XCH.

Chia Network CEO Gene Hoffman addressed this risk directly in a blog post on Chia’s official site, writing: “While many individuals worry about having their private keys stolen — and it does happen — you’re far more likely to simply lose access to your wallet.”[5] His point is worth taking seriously for farmers of all sizes: the greater risk is accidental loss, but the two-key setup protects against both.

How the Two-Key System Works

The two-key setup uses your default farming key for plotting and block signing, and a separate cold storage key whose wallet address receives all farming rewards.[1] Here is how to configure it: generate a second key with chia keys generate, write down its mnemonic immediately, note its fingerprint, then run chia keys show to copy its first wallet address. Open ~/.chia/mainnet/config/config.yaml and update both instances of xch_target_address — one under the farmer section and one under the pool section — to that cold storage address. Finally, delete the cold storage key from your farming machine with chia keys delete -f <fingerprint>.[1] Your farming rig now sends rewards to a wallet whose private key is never present on the farming machine.

The two-key Chia farming setup sends rewards to a cold storage wallet that never touches your online farming node, protecting your XCH even if your rig is compromised.

FeatureSingle Key (Default)Two-Key (Farming + Cold Storage)
Setup complexitySimple — works out of the boxModerate — requires config.yaml edit
Wallet access on farming nodeYes — full accessNo — wallet key stored separately
Risk if farming PC is hackedHigh — attacker can spend XCHLow — no wallet key on the machine
Number of mnemonics to back up12 — one for farming, one for cold storage
Best suited forCasual farmers, small setupsSerious farmers, large XCH balances
To spend XCHAnytime from the same machineMust re-import cold storage key manually

Automating Your Chia Key Backup — Set It and Forget It

Your 24-word mnemonic backup is a one-time manual task. But your database and config file backups should be automated. Drives fail unexpectedly. A scheduled backup running in the background is the difference between a 30-minute recovery and a multi-day re-sync.

Linux and macOS: Cron-Based Backup Script

A simple shell script using rsync can copy your Chia data directories to an external drive or secondary location on a schedule. Here is an example script that backs up your database folders and config file:

#!/bin/bash
BACKUP_DIR="/mnt/backup/chia-backup"
CHIA_DIR="$HOME/.chia/mainnet"
mkdir -p "$BACKUP_DIR"
rsync -av "$CHIA_DIR/db/" "$BACKUP_DIR/db/"
rsync -av "$CHIA_DIR/wallet/db/" "$BACKUP_DIR/wallet-db/"
rsync -av "$CHIA_DIR/config/config.yaml" "$BACKUP_DIR/config.yaml"
echo "Chia backup completed: $(date)"

Save this as chia-backup.sh, make it executable with chmod +x chia-backup.sh, and schedule it using cron. For a daily backup at 2:00 AM, add this line to your crontab with crontab -e:

0 2 * * * /path/to/chia-backup.sh >> /var/log/chia-backup.log 2>&1

This runs silently every night and logs the output so you can verify it worked. For large farming setups, consider running this backup only when Chia is idle or using rsync‘s --checksum flag to skip files that have not changed, reducing the backup window significantly.

Windows: Task Scheduler Backup

On Windows, you can use PowerShell and Task Scheduler to achieve the same result. Create a PowerShell script that copies your Chia data folders to a backup drive, then schedule it to run nightly using Task Scheduler. The Chia data root on Windows is typically %HOMEDRIVE%%HOMEPATH%\.chia\mainnet\. Use robocopy in your script for reliable folder mirroring — it handles large files and interrupted transfers better than a standard copy command.

Regardless of operating system, test your backup regularly. A backup you cannot restore from is not a backup. Once a month, verify that your copied database files are intact and that your written mnemonic still matches what chia keys show --show-mnemonic-seed displays.[6]

Real-World Reference: The Chia Network official documentation for the two-key cold storage setup explicitly outlines how farmers can configure their config.yaml to send farming rewards to a separately generated cold wallet address, then delete the cold key from the active farming machine entirely.[1] This workflow — documented directly in Chia’s official reference client guide — demonstrates that the two-key security model is a supported, production-ready configuration, not an experimental workaround. Farmers with significant XCH balances who adopt this setup separate their operational security from their financial security at the protocol level.

Take Control of Your Chia Key Backup Before It Is Too Late

The Chia blockchain is unforgiving about key loss, but it is also entirely transparent about how to protect yourself. Your chia key backup strategy starts with 24 words on paper, gets stronger with a passphrase-protected keyring.yaml, and becomes nearly bulletproof when combined with automated database backups and a two-key farming setup. Most farmers who lose XCH do not lose it to hackers — they lose it to a hard drive failure they were not prepared for. The steps in this guide take under an hour to implement fully. The cost of skipping them can be permanent. Take the time now, verify everything works, and then let your automated backup system run quietly in the background while your farming rig does its job. For more on getting the most from your Chia installation, including software updates that affect your wallet and farming setup, see our Chia Reference Client farming guide.

chia key backup FAQs

What is a chia key backup and why does it matter?

A chia key backup is a secure copy of your 24-word mnemonic seed phrase, which is the only supported method of recovering your Chia wallet if your computer fails or software is reinstalled.[3] Without it, all XCH held in that wallet is permanently inaccessible — no recovery service can help you.

How do I perform a chia key backup using the command line?

To perform a chia key backup from the CLI, run chia keys show --show-mnemonic-seed in your terminal or PowerShell window.[4] Write down the 24 words displayed in exact order, verify them against the output, and store the paper copy in a secure offline location.

Where is the keyring.yaml file stored in Chia?

The keyring.yaml file is stored at ~/.chia_keys/keyring.yaml on macOS and Linux, and at %HOMEDRIVE%%HOMEPATH%/.chia_keys/keyring.yaml on Windows.[2] This file holds your encrypted keys and can be moved between Chia installations to avoid re-entering your 24-word mnemonic.

Can I recover my Chia wallet without the 24-word mnemonic?

No — the 24-word mnemonic seed phrase is the only supported method of wallet recovery on the Chia blockchain.[3] Copying the ~/.chia/mainnet/ folder or the OS keychain to a new machine is not a supported recovery path and will not restore lost keys.

What is the two-key farming setup and should I use it?

The two-key setup uses one key for farming operations and a separate cold storage key to receive all XCH rewards, so your wallet private key is never on your farming machine.[1] Any farmer with a significant XCH balance or a farming rig connected to the internet 24/7 should strongly consider this setup to reduce theft risk.

chia key backup Citations

  1. Chia Network. “Key Management.” Chia Documentation. https://docs.chia.net/reference-client/install-and-setup/key-management/
  2. Chia Network. “Password Protected Keys.” Chia Documentation. https://docs.chia.net/reference-client/install-and-setup/password-protected-keys/
  3. Chia Network. “BLS Keys Architecture.” Chia Documentation. https://docs.chia.net/bls-keys/
  4. Chia Network. “Locating Keys.” Chia Documentation. https://docs.chia.net/reference-client/troubleshooting/locating-keys/
  5. Hoffman, Gene. “Cypherpunks in Sportcoats: Chia’s Custody is a Killer App.” Chia Network Blog, January 18, 2023. https://www.chia.net/2023/01/18/cypherpunks-in-sportcoats-chias-custody-is-a-killer-app/
  6. Chia Network. “CLI Overview.” Chia Documentation. https://docs.chia.net/cli/
  7. ChiaTribe. “Chia Farming Reference Client Version 2.0.0.” ChiaTribe.com. https://chiatribe.com/chia-farming-reference-client-version-2-0-0/