2

According to the release notes v0.14.1.0 includes Trezor support. How do I generate a Trezor Monero wallet with the CLI (monero-wallet-cli)?

  • Thanks it works. Question, when opening the CLI to open the trezor monero wallet, first step is to specify the wallet file name. For the trezor specific case, Can I still access my funds if the wallet file on my PC is ever lost, and how? – M-house Jun 22 at 16:15
  • Yes. You can restore your wallet by simply generating a new set of Trezor Monero wallet files. See [1] of "A few final notes:". I will also create a dedicated Q&A later. – dEBRUYNE Jun 23 at 9:08
  • Quick test including restore works well many thanks dEBRUYNE – M-house Jun 23 at 11:36
  • Good to hear and you're welcome. – dEBRUYNE Jun 23 at 15:24
3

Note that Monero support is currently only available for the model T.

Windows / Linux / Mac OS X

We first have to ensure that we're sufficiently prepared. This entails the following:

  1. This guide assumes you have already initialized your Trezor device and thus generated a 12 or 24 word mnemonic seed.

  2. You need to run / use CLI v0.14.1.0, which can be found here, on the downloads page of the official website, or on Github.

  3. Make sure your firmware is up to date.

  4. Your Trezor needs to be plugged in.

  5. Either your daemon (monerod.exe (Windows) or monerod (Linux and Mac OS X)) should be running and preferably be fully synced or you should connect to a remote node.

Now that we're sufficiently prepared, let's start!

Windows

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

  2. Open a new command prompt / powershell. This is done by first making sure your cursor isn't located on any of the files and subsequently doing SHIFT + right click. It will give you an option to "Open command window here". If you're using Windows 10, it'll, most likely, give you an option to open the Powershell.

  3. Now type:

    monero-wallet-cli.exe --hw-device Trezor --generate-from-device <new-wallet-name> (Win 7 + 8)

    .\monero-wallet-cli.exe --hw-device Trezor --generate-from-device <new-wallet-name> (Win 10)

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.exe --hw-device Trezor --generate-from-device MoneroWallet (Win 7 + 8)

.\monero-wallet-cli.exe --hw-device Trezor --generate-from-device MoneroWallet (Win 10)

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

  2. 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.

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

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

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

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

  7. 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).

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

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


Mac OS X

  1. Use Finder to browse to the directory / folder monero-wallet-cli (CLI v0.14.1.0) is located.

  2. Go to your desktop.

  3. Open a new terminal (if don't know how to open a terminal, see here).

  4. Drag monero-wallet-cli in the terminal. It should add the full path to the terminal. Do not hit enter.

  5. Now type:

    --hw-device Trezor --generate-from-device <new-wallet-name>

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:

--hw-device Trezor --generate-from-device MoneroWallet

Note that aforementioned text will be appended to the path of monero-wallet-cli. Thus, before you hit enter, your terminal should look like:

/full/path/to/monero-wallet-cli --hw-device Trezor --generate-from-device <new-wallet-name>

Where the full path is, intuitively, the actual path on your Mac OS X.

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

  2. 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.

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

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

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

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

  7. 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).

  8. 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.

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


Linux

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

  2. Open a new terminal

  3. Now type:

    ./monero-wallet-cli --hw-device Trezor --generate-from-device <new-wallet-name>

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

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

  2. 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.

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

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

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

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

  7. 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).

  8. 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.

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


A few final notes:

  1. 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.

  2. 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).

  3. 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.

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

  2. If you have any further questions or need assistance, please leave a comment in this thread.

  • To get this to work on Windows 10, I had to open powershell as adminstrator and run monerod there. Monerod would not run with a regular powershell command prompt; it would not open the LMDB database. – Patrick Alexander Jun 22 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.