Maintenance Complete – Service Restored – Nodes Upgraded
How to restore Monero wallet on CLI 2026 — command line recovery guide

How to Restore Your Monero Wallet Using the CLI: Step-by-Step Guide (2026)

How to restore Monero XMR wallet using CLI command line — seed phrase and private keys recovery guide 2026

By XMRWallet Team  ·  Published  ·  6 min read

Restore your Monero wallet instantly using your seed words in XMRWallet — click here. No download required.

The Monero command-line interface (CLI) wallet is the most powerful and flexible way to manage Monero — and for developers, advanced users, and anyone who prefers direct control over software behavior, it is also a reliable recovery tool. The monero-wallet-cli binary gives you complete control over your node, funds, and wallet configuration, and includes an HTTP RPC interface, analysis tools, and a 0MQ interface not available in the GUI.

This guide covers both primary recovery methods: restoring from your 25-word mnemonic seed phrase, and restoring from private keys (address + spend key + view key).

Prerequisites: Download the official Monero CLI wallet from getmonero.org/downloads and verify its cryptographic signature before use. You will need your 25-word mnemonic seed phrase OR your address + private spend key + private view key. You should also have the wallet creation date or first transaction date to set the restore height.

Method 1: Restore from Mnemonic Seed (25 words)

Open a terminal (Linux/macOS) or Command Prompt (Windows) and navigate to the directory containing the monero-wallet-cli binary.

Step 1 — Run the restore command:

Linux / macOS:
./monero-wallet-cli --restore-deterministic-wallet

Windows:
monero-wallet-cli --restore-deterministic-wallet

Step 2 — Name your wallet file:

When prompted, enter a name for the restored wallet file. This is the filename that will be created on your device — it does not need to match the original wallet name. Press Enter.

Step 3 — Set a wallet password:

You will be asked to create a password. This password encrypts the wallet file stored on your device — choose a strong, unique password. It is separate from your mnemonic seed: someone with your seed phrase can recover the wallet on any device regardless of this password.

Step 4 — Enter your 25-word mnemonic seed:

Type your 25-word mnemonic seed phrase exactly as written in your backup, with each word separated by a space. The words must be in the correct order. The 25th word is a checksum — the software will flag an error if the checksum does not match, which indicates a transcription error in one or more words.

Step 5 — Set the restore height:

You will be asked for a restore height. This tells the wallet where in the blockchain to start scanning for your transactions. Enter:

  • The block number of your earliest known incoming transaction, or
  • The date of your earliest known incoming transaction in YYYY-MM-DD format (e.g., 2022-06-01).

Do not leave this blank — if you do, the wallet starts scanning from block 0 and synchronization can take many hours or days. If you are unsure of the exact date, use a date slightly before your first transaction. If the balance shown after syncing is incorrect, re-run the restore with a lower height.

Step 6 — Wait for synchronization:

After entering the restore height, synchronization begins automatically. The wallet scans the blockchain from the restore height forward, identifying transactions that belong to your wallet. Allow synchronization to complete fully before checking your balance or initiating any transactions. Progress is displayed in the terminal.

Troubleshooting:

If you encounter issues, run ./monero-wallet-cli --help (Linux/macOS) or monero-wallet-cli --help (Windows) to see all available startup options. Once inside an open wallet, type help at the prompt to see all available wallet commands.

Method 2: Restore from Private Keys

If you have your Monero address, private spend key, and private view key (but not your seed phrase), you can restore using the --generate-from-keys flag. You can also use your .keys file if you have it.

Step 1 — Run the key restore command:

Linux / macOS:
./monero-wallet-cli --generate-from-keys YourNewWalletName.keys

Windows:
monero-wallet-cli --generate-from-keys YourNewWalletName.keys

Replace YourNewWalletName with whatever you want to name the restored wallet file.

Step 2 — Enter your wallet credentials:

The program will prompt you for your primary Monero address (the 95-character string beginning with 4), your private spend key, and your private view key. Enter each one carefully.

Step 3 — Set a new password:

Set a strong password for the newly restored wallet file.

Step 4 — Verify and sync:

If the parameters are accepted, the wallet is re-generated and synchronization begins. Set the restore height when prompted, as described in Method 1. Run ./monero-wallet-cli --help if you encounter problems.

Alternative: Restore Instantly Without the CLI

If you prefer not to use the command line, you have two simpler alternatives:

  • XMRWallet — visit the site, click "Open Wallet," enter your 25-word seed phrase. No download, no installation. Keys are processed locally in your browser and never transmitted.
  • Monero GUI wallet — the official graphical interface application for users who prefer a visual step-by-step restore process. See our GUI restore guide for instructions.

Frequently Asked Questions

What is the command to restore a Monero wallet from seed on the CLI?

Linux/macOS: ./monero-wallet-cli --restore-deterministic-wallet
Windows: monero-wallet-cli --restore-deterministic-wallet
The program will prompt you for a wallet name, password, 25-word seed phrase, and restore height.

What is the command to restore a Monero wallet from private keys on the CLI?

Linux/macOS: ./monero-wallet-cli --generate-from-keys WalletName.keys
Windows: monero-wallet-cli --generate-from-keys WalletName.keys
You will be prompted for your Monero address, private spend key, and private view key.

Why should I set a restore height?

Without a restore height, monero-wallet-cli scans the entire Monero blockchain from block 0 — which can take many hours or days. Setting the restore height to your wallet creation date or first transaction date limits scanning to only the relevant portion of the blockchain, reducing sync time dramatically. If you later find your balance is wrong, lower the restore height and re-run the restore.

Sources & further reading:
Latest crypto news & tips

Updates, news and tips on investing in Monero (XMR), crypto and more!