You can stake SOL from a terminal with the Solana command-line tools in four commands. You make an address for a stake account and fund it with SOL. Then you look up a validator and delegate to it. The SOL stays in an account your own keys control.
The command line suits people who already use it, or who want a hardware wallet to sign without a browser. For a wallet app instead, doing the same job in a wallet app takes a few taps, and our main page has the options that need no terminal at all.
What you need before you stake from the Solana CLI
You need the Solana command-line tools and a wallet they can sign with. You also need at least 1 SOL, plus a little for fees. The whole job takes about ten minutes. Staking starts at the next epoch boundary, which comes around once a day.
Install the Solana CLI
Anza publishes the tools. On macOS or Linux, its install guide gives a one-line installer:
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
Check it worked:
solana --version
On Windows, the same guide has a separate installer.
Point the CLI at mainnet
The tools can talk to test networks too, so set the main network first and confirm it (Anza):
solana config set --url https://api.mainnet-beta.solana.com
solana config get
Sign with a keypair file or a Ledger
The CLI signs with a keypair file or a hardware wallet.
With a Ledger device, first close Ledger Live and open the Solana app. Then use usb://ledger wherever a command asks for a keypair.
You approve each transaction on the device itself. Anza's hardware wallet guide has the details.
In the commands below, <WALLET_KEYPAIR> stands for your keypair file, such as ~/.config/solana/id.json, or usb://ledger. Check the balance of the wallet you will stake from:
solana balance <WALLET_KEYPAIR>
Step 1: create a stake account keypair
A stake account needs a fresh address. The quickest way to get one is a throwaway keypair file. It only reserves a new, unused address; it does not control the account.
solana-keygen new --no-passphrase -o stake-account.json
Note the public key it prints after pubkey:. That is your stake account's address, and you will use it in every later step. Once the account exists, you can delete the file: it never controls the account, so losing it costs nothing.
Step 2: create the stake account with create-stake-account
The create-stake-account command moves SOL from your wallet into the new stake account and sets who controls it. It takes the keypair file from step 1 and an amount in SOL.
solana create-stake-account stake-account.json 10 \
--from <WALLET_KEYPAIR> \
--stake-authority <WALLET_KEYPAIR> \
--withdraw-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
Here 10 is the amount in SOL. It can also be the word ALL, but that empties the wallet and leaves nothing to pay the fee for delegate-stake. A number is safer.
The 1 SOL minimum: how much to put in
Each new stake account needs at least 1 SOL to delegate, a rule the network has enforced since June 2026. The account also holds a small refundable rent deposit on top. So put in a little over the amount you want earning.
Stake authority and withdraw authority
The stake authority runs the staking, such as picking the validator and unstaking. The withdraw authority is the only key that can take SOL out. Here both are your wallet, which is what wallet apps do too.
You can name different keys, for example a cold Ledger as withdraw authority and a hot keypair as stake authority. Guard the withdraw authority above all: whoever holds it can take the SOL, and if it is lost, nobody can ever withdraw from the account. What each key can and can't do is set out in a table on our stake account page.
Step 3: find a validator's vote account
You delegate to a validator's vote account, not its identity. The solana validators command lists them all, with the vote account in the second column:
solana validators
The list is long and shows only addresses. Most people pick on a website first, then copy the vote account. Sorting our validator table by fee or by size narrows it down, and each row shows the voting record too. A few checks count most:
- a fair commission, with no history of raising it;
- a strong voting record and no recent downtime;
- not one of the very largest validators, which keeps Solana spread out.
Delegating to the Solana Compass validator
Solana Compass runs its own validator. It takes 0% of your inflation rewards and 10% of MEV tips. Its vote account is:
EARNynHRWg6GfyJCmrrizcZxARB3HVzcaasvNa8kBS72
What the validator earns pays for our guides, data and tools. Its live record and uptime are public.
Step 4: delegate with delegate-stake
The delegate-stake command points your stake account at the validator you chose. It needs the stake authority's signature.
solana delegate-stake <STAKE_ACCOUNT_ADDRESS> <VOTE_ACCOUNT_ADDRESS> \
--stake-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
Your stake now shows as activating. It turns active at the next epoch boundary and earns from then on.
The first reward lands one epoch later. With epochs of about a day, that is one to two days after you delegate. A live countdown shows when the next boundary falls.
Check stake status and rewards with solana stake-account
The solana stake-account command shows a stake account's balance, status and the validator it backs. After delegating, it should list a delegated stake and the vote account you chose.
solana stake-account <STAKE_ACCOUNT_ADDRESS>
Add --with-rewards to see the latest reward, and --num-rewards-epochs with a number to see more epochs:
solana stake-account <STAKE_ACCOUNT_ADDRESS> --with-rewards --num-rewards-epochs 5
Rewards from new SOL are added to the stake every epoch, and they earn too. You don't claim them.
MEV tips, which traders pay validators for a place in a block, land in the same account as spare SOL. That SOL earns nothing until you restake it, which our tip harvester does from a browser wallet.
How to unstake: deactivate-stake, then withdraw-stake
Unstaking from the CLI takes two commands, a day or less apart. deactivate-stake unstakes: the stake stops earning when the current epoch ends. withdraw-stake then moves the SOL back to a wallet. Nothing leaves the stake account until you run the second command.
- Deactivate the stake with the stake authority.
- Wait for the next epoch boundary, about a day at most.
- Check that the account shows as inactive.
- Withdraw the SOL with the withdraw authority.
Deactivate the stake
solana deactivate-stake <STAKE_ACCOUNT_ADDRESS> \
--stake-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
The account now shows as deactivating. It keeps earning for the rest of this epoch, so unstaking early in an epoch costs you nothing extra. The time left until the epoch ends is the wait.
Check that the stake is inactive
Run the status command from the section above:
solana stake-account <STAKE_ACCOUNT_ADDRESS>
Once the boundary has passed, it no longer lists an active stake. If it still shows the stake as deactivating, the epoch hasn't ended yet. Wait and run it again.
Withdraw SOL once the epoch has ended
withdraw-stake moves the SOL to any address you name, usually your own wallet. It needs the withdraw authority.
solana withdraw-stake <STAKE_ACCOUNT_ADDRESS> <RECIPIENT_ADDRESS> ALL \
--withdraw-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
Withdrawing everything closes the account and returns its rent deposit. To take out part, put a number of SOL in place of ALL. Use AVAILABLE to take out only spare SOL, such as tips, from an account that stays staked.
Switching validators instead of withdrawing
To move to another validator, you don't need to withdraw. Deactivate as above, wait for the account to turn inactive, then run delegate-stake again with the new vote account. A delegation sent while the account is still deactivating fails, so wait for the boundary first. The switch costs about a day of rewards.
To skip the wait altogether, Solana Compass can buy the stake account from you for SOL straight away, for a small fee shown before you sign.
Split, merge and re-key stake accounts: split-stake, merge-stake, stake-authorize
Three more commands cover the rest of what a stake account can do. Each is signed by one of the account's authorities and costs a network fee. A split also moves a small refundable deposit from the fee payer into the new account.
| Command | What it does | Example use |
|---|---|---|
split-stake |
Moves part of a stake account into a new one | Unstake 30 of 100 SOL, or spread SOL across validators |
merge-stake |
Folds one stake account into another | Tidy several small accounts into one |
stake-authorize |
Sets a new stake or withdraw authority | Move control to a hardware wallet |
split-stake
You need a new keypair file for the second account, as in step 1. The amount you split off must be at least the 1 SOL minimum delegation.
solana-keygen new --no-passphrase -o split-account.json
solana split-stake <STAKE_ACCOUNT_ADDRESS> split-account.json 30 \
--stake-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
merge-stake
The first address is the account to keep. The second is merged into it and stops existing.
solana merge-stake <STAKE_ACCOUNT_TO_KEEP> <STAKE_ACCOUNT_TO_MERGE> \
--stake-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
Two accounts can merge only with the same authorities and lockup, and only in matching states, such as both active with the same validator. Our browser tool for combining stake accounts finds the accounts that qualify and simulates the merge before you sign.
stake-authorize
This sets a new stake authority. Use --new-withdraw-authority with the withdraw authority's signature to replace that key instead.
solana stake-authorize <STAKE_ACCOUNT_ADDRESS> \
--stake-authority <WALLET_KEYPAIR> \
--new-stake-authority <NEW_PUBKEY> \
--fee-payer <WALLET_KEYPAIR>
Check the new address twice before you run this. Whoever holds the withdraw authority controls the SOL, and no genuine service will ask you to hand it over.
Why you would change a stake or withdraw authority
Most people never change either key. The usual reasons to do it are:
- moving control to a hardware wallet or a multisig, a wallet that needs several people to approve each move, after staking from a hot keypair;
- handing a stake account to a new owner, or to a custodian who will manage it for you, without unstaking first;
- replacing a key that may be exposed, such as a keypair file that was copied to a shared machine or a backup you no longer trust;
- giving day-to-day control to someone else, such as a team that moves stake between validators, while the withdraw authority stays with you.
If a key may be exposed, change the withdraw authority first, because it is the one that can take the SOL. Then set a new stake authority from it.
When your validator stops voting: deactivate delinquent stake
If a validator goes offline, its stake stops earning. After five epochs with no votes, anyone can unstake it.
The rule keeps the network healthy. Stake decides which validators get turns to produce blocks and how much weight their votes carry. While a validator is offline, its blocks are skipped and transactions wait longer. Clearing stake from a validator that has been down for five epochs stops it counting towards one that does no work.
The CLI has a flag for this:
solana deactivate-stake <STAKE_ACCOUNT_ADDRESS> --delinquent \
--stake-authority <WALLET_KEYPAIR> \
--fee-payer <WALLET_KEYPAIR>
The stake then sits idle until you delegate it again. Nothing tells you this has happened. So run solana stake-account now and then to check.
Common Solana CLI staking errors and fixes
Most failed staking commands come down to a handful of causes. The error text usually names it, and each has a quick fix:
| Error or symptom | What it means | Fix |
|---|---|---|
| Insufficient funds | The wallet can't cover the stake, rent deposit and fee | Check solana balance and lower the amount |
| Below the minimum delegation | A new or split account holds under 1 SOL | Add SOL, or split off a larger amount |
| Delegate fails after unstaking | The account is still cooling down | Wait for the epoch to end, then try again |
| Invalid vote account | You used the validator's identity address | Use the vote account from the second column |
| Ledger not found | Ledger Live is open, or the Solana app isn't | Close Ledger Live and open the Solana app |
In zsh, the ? in a Ledger address is a special character, so escape it, as in usb://ledger\?key=0.
If a command times out on the public network address, run it again. That address limits how many requests each user can send, so a retry usually goes through. An RPC provider's address works the same way with solana config set --url.