Monero (XMR) restore wallet with Trezor

From Linux - Help
Jump to navigation Jump to search


Go to the directory / folder v0.17.1.3 monero-wallet-cli and monerod are located.

Open a new terminal and type:

 monero-wallet-cli --hw-device Trezor --generate-from-device <new-wallet-name> --restore-height XXX

Note that is simply a placeholder for the actual wallet name. If you, for instance, want to name your wallet MoneroWallet, the command would be as follows:

./monero-wallet-cli --hw-device Trezor --generate-from-device MoneroWallet

The CLI will, after executing aforementioned command, prompt your for a password. Make sure to set a strong password and confirm it thereafter.

If you enabled the passphrase feature on the Trezor device (skip this step if not), a Device requires attention will now be displayed. The device will ask you whether you want to enter your password on the host (your system) or the Trezor device. Choose your desired option.

A Device requires attention will now be displayed. The device will ask you whether to export the watch-only credentials. Proceed with Yes.

Your Trezor Monero wallet will now be generated. This should be almost instantly and definitely not take longer than a minute.

The CLI will now display a No restore height is specified. message. Use Yes to proceed.

The CLI may now display a Restore height x is not yet reached message. Use Yes to proceed.

The CLI will, if using your own (local) node, display a message about background mining. Proceed with your desired answer (i.e. Yes or No).

The Trezor device will now ask you to confirm the start of the wallet refresh. After confirmation, monero-wallet-cli will start refreshing. Wait until it has fully refreshed.

Congratulations, you can now use your Trezor Monero wallet in conjunction with the CLI.

A few final notes:

I'd strongly advise to test the full process first. That is, send a small amount to the wallet and subsequently restore it (using aforementioned guide) to verify that you can recover the wallet. Note that, upon recreating / restoring the wallet, you ought to append the --restore-height flag (with a block height before the height of your first transaction to the wallet) to the command in step 3 (Windows), step 5 (Mac OS X), or step 3 (Linux). More information about the restore height and how to approximate it can be found here.

If you use a remote node, append the --daemon-address host:port flag to the command in step 3 (Windows), step 5 (Mac OS X), or step 3 (Linux).

You only have to use the --generate-from-device flag once (i.e. upon wallet creation). Thereafter, you'd basically use it similar to how you normally use the CLI. That is:

1. Make sure your Trezor device is plugged in.

2. Open monero-wallet-cli

3. Enter the wallet name of your Trezor Monero wallet.

4. Enter the password to open the wallet.

If the Trezor Monero wallet files are not in the same directory as monero-wallet-cli, you ought to open monero-wallet-cli with the --wallet-file /path/to/wallet.keys/file flag. Alternatively, you can copy the Trezor Monero wallet files to the same directory as monero-wallet-cli.

Upon closing the wallet, make sure to exit monero-wallet-cli first by typing exit. You can, thereafter, remove / unplug the Trezor device.