This page describes how to use a Ledger Nano S or Nano X to interact with Solana using the command line tools. To see other solutions to interact with Solana with your Nano, click here.
- Ensure the Ledger Live application is closed
- Plug your Nano into your computer's USB port
- Enter your pin and start the Solana app on the Nano
- Ensure the screen reads "Application is ready"
On your computer, run:
This confirms your Ledger device is connected properly and in the correct state to interact with the Solana CLI. The command returns your Ledger's unique wallet ID. When you have multiple Nano devices connected to the same computer, you can use your wallet ID to specify which Ledger hardware wallet you want to use. If you only plan to use a single Nano on your computer at a time, you don't need to include the wallet ID. For information on using the wallet ID to use a specific Ledger, see Manage Multiple Hardware Wallets.
Your Nano supports an arbitrary number of valid wallet addresses and signers.
To view any address, use the
solana-keygen pubkey command, as shown below,
followed by a valid keypair URL.
Multiple wallet addresses can be useful if you want to transfer tokens between your own accounts for different purposes, or use different keypairs on the device as signing authorities for a stake account, for example.
All of the following commands will display different addresses, associated with the keypair path given. Try them out!
- NOTE: keypair url parameters are ignored in zsh see troubleshooting for more info
You can use other values for the number after
key= as well.
Any of the addresses displayed by these commands are valid Solana wallet
addresses. The private portion associated with each address is stored securely
on the Nano, and is used to sign transactions from this address.
Just make a note of which keypair URL you used to derive any address you will be
using to receive tokens.
If you are only planning to use a single address/keypair on your device, a good
easy-to-remember path might be to use the address at
key=0. View this address
Now you have a wallet address (or multiple addresses), you can share any of these addresses publicly to act as a receiving address, and you can use the associated keypair URL as the signer for transactions from that address.
To view the balance of any account, regardless of which wallet it uses, use the
solana balance command:
For example, if your address is
then enter the following command to view the balance:
You can also view the balance of any account address on the Accounts tab in the Explorer and paste the address in the box to view the balance in you web browser.
Note: Any address with a balance of 0 SOL, such as a newly created one on your Ledger, will show as "Not Found" in the explorer. Empty accounts and non-existent accounts are treated the same in Solana. This will change when your account address has some SOL in it.
To send some tokens from an address controlled by your Nano, you will need to use the device to sign a transaction, using the same keypair URL you used to derive the address. To do this, make sure your Nano is plugged in, unlocked with the PIN, Ledger Live is not running, and the Solana App is open on the device, showing "Application is Ready".
solana transfer command is used to specify to which address to send tokens,
how many tokens to send, and uses the
--keypair argument to specify which
keypair is sending the tokens, which will sign the transaction, and the balance
from the associated address will decrease.
Below is a full example. First, an address is viewed at a certain keypair URL.
Second, the balance of that address is checked. Lastly, a transfer transaction
is entered to send
1 SOL to the recipient address
When you hit Enter for a transfer command, you will be prompted to approve the
transaction details on your Ledger device. On the device, use the right and
left buttons to review the transaction details. If they look correct, click
both buttons on the "Approve" screen, otherwise push both buttons on the "Reject"
After approving the transaction on your device, the program will display the transaction signature, and wait for the maximum number of confirmations (32) before returning. This only takes a few seconds, and then the transaction is finalized on the Solana network. You can view details of this or any other transaction by going to the Transaction tab in the Explorer and paste in the transaction signature.
It is sometimes useful to sign a transaction with keys from multiple hardware wallets. Signing with multiple wallets requires fully qualified keypair URLs. When the URL is not fully qualified, the Solana CLI will prompt you with the fully qualified URLs of all connected hardware wallets, and ask you to choose which wallet to use for each signature.
Instead of using the interactive prompts, you can generate fully qualified
URLs using the Solana CLI
resolve-signer command. For example, try
connecting a Nano to USB, unlock it with your pin, and running the
You will see output similar to:
BsNsvfXqQTtJnagwFWdBS7FBXgnsK8VZ5CmuznN85swK is your
With your fully qualified URL, you can connect multiple hardware wallets to
the same computer and uniquely identify a keypair from any of them.
Use the output from the
resolve-signer command anywhere a
<KEYPAIR> entry to use that resolved path as the signer for that
part of the given transaction.
The question mark character is a special character in zsh. If that's not a
feature you use, add the following line to your
~/.zshrc to treat it as a
Then either restart your shell window or run
If you would prefer not to disable zsh's special handling of the question mark character, you can disable it explictly with a backslash in your keypair URLs. For example:
Check out our Wallet Support Page for ways to get help.