<p>You can use cardano-cli to delegate.</p>
<p>First, make sure your stake address is registered on chain.
If it isn't already and you want to do it from cardano-cli, you must first build the stake-address registration certificate:</p>
<pre><code>cardano-cli stake-address registration-certificate \
--stake-verification-key-file &lt;STAKE.VKEY_FILEPATH&gt; \
--out-file &lt;STAKE_ADDRESS_REGISTRATION_CERTIFICATE_FILE&gt;
</code></pre>
<p>Submitting this certificate (if you haven't already) will cost 2 ADA as a deposit (which you can then reclaim if you de-register the stake address).</p>
<p>Next, construct a delegation certificate for the pool you wish to delegate to:</p>
<pre><code>cardano-cli stake-address delegation-certificate \
--stake-verification-key-file &lt;STAKE.VKEY_FILEPATH&gt; \
--stake-pool-id &lt;BECH32_OR_HEX-encoded_STAKEPOOL_ID&gt; \
--out-file &lt;DELEGATION_CERTIFICATE_FILEPATH&gt; \
</code></pre>
<p>You may then submit these two certificates in a single transaction. If your stake address is already registered on chain you can skip the registration cert and only construct/submit the delegation cert.</p>
<p>For further clarification regarding this and/or signing/submitting these certs as transaction, I'd recommend the <a href="https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/part-iii-operation/registering-your-stake-pool" rel="nofollow noreferrer">CoinCashew Guide, specifically the section on pool registration.</a></p>

CC BY-SA 4.0
2022-04-03T10:16:51.680Z
Where does `STAKE.VKEY_FILEPATH` come from?
prunmit
CC BY-SA 4.0
2022-04-03T10:19:56.303Z
The CoinCashew Guide appears helpful but falls short because it's instructing on how to create a new stake pool instead of delegating to an existing stake pool.
prunmit
CC BY-SA 4.0
2022-04-03T12:50:06.603Z
<STAKE>VKEY_FILEPATH> is just a placeholder name for where in your filesystem the stake verification key is located. Also, yes the guide is more involved than simple delegation, but manual delegation is part of the guide and can be used for more than just creating pools.
zhekson
CC BY-SA 4.0
2022-04-03T13:43:55.477Z
I still don't understand where the stake verification key comes from. I've tried going through the guide and was unsuccessful because it's incomplete.
prunmit
CC BY-SA 4.0
2022-04-03T13:50:45.040Z
Cardano has payment and staking keypairs (public and private) which you combine to build shelley-era addresses. You can create this keypairs manually using cardano-cli, or import them from an existing wallet
zhekson
CC BY-SA 4.0
2022-04-03T17:08:52.423Z
So you could generate a staking keypair for the purpose of registering and then discard the private key?
prunmit
CC BY-SA 4.0
2022-04-03T20:41:13.270Z
No, the staking private key is needed for delegating/redelegating to pools, as well as for withdrawing rewards to your main address. Read more about cardano keypairs here: https://developers.cardano.org/docs/operate-a-stake-pool/cardano-key-pairs/
zhekson
CC BY-SA 4.0
2022-04-04T05:34:00.367Z
This doesn't make any sense though because the staking key is disassociated with the wallet, it's just random
prunmit
CC BY-SA 4.0
2022-04-04T05:40:22.463Z
That article is stating that the stake key is *derived* from the wallet. So now I'm even more confused because this is contradictory to the information I was following in other articles.
prunmit
CC BY-SA 4.0
2022-04-04T05:57:01.683Z
This is what I was missing: https://cardano.stackexchange.com/questions/6045/get-wallet-skey-vkey-from-mnemonic

The stake key comes from the wallet itself.
prunmit
CC BY-SA 4.0
2022-04-04T06:35:10.583Z
Finally got it working!
prunmit
CC BY-SA 4.0
2022-04-02T16:44:51.377Z
2022-04-02T16:44:51.377Z
zhekson
<p>Using any graphical based wallet it's trivial to delegate to a stake pool. How do you accomplish this same task using only CLI tools (e.g. cardano-cli)?</p>

<cardano-cli><wallet><staking>
How to delegate to a stake pool using CLI?
# How to delegate to a stake pool using CLI?

(Asked by: username_0 on 2022-04-02)

Using any graphical based wallet it's trivial to delegate to a stake pool. How do you accomplish this same task using only CLI tools (e.g. cardano-cli)?

**Tags:** cardano-cli, wallet, staking

---

## 1 answers

### Answer by username_1 on 2022-04-02. Score: 3

You can use cardano-cli to delegate.
First, make sure your stake address is registered on chain.
If it isn't already and you want to do it from cardano-cli, you must first build the stake-address registration certificate:
cardano-cli stake-address registration-certificate \
--stake-verification-key-file  \
--out-file 

Submitting this certificate (if you haven't already) will cost 2 ADA as a deposit (which you can then reclaim if you de-register the stake address).
Next, construct a delegation certificate for the pool you wish to delegate to:
cardano-cli stake-address delegation-certificate \
--stake-verification-key-file  \
--stake-pool-id  \
--out-file  \

You may then submit these two certificates in a single transaction. If your stake address is already registered on chain you can skip the registration cert and only construct/submit the delegation cert.
For further clarification regarding this and/or signing/submitting these certs as transaction, I'd recommend the CoinCashew Guide, specifically the section on pool registration.

> **Comments:**
> **username_0**: Where does `STAKE.VKEY_FILEPATH` come from?  
> **username_0**: The CoinCashew Guide appears helpful but falls short because it's instructing on how to create a new stake pool instead of delegating to an existing stake pool.  
> **username_1**: <STAKE>VKEY_FILEPATH> is just a placeholder name for where in your filesystem the stake verification key is located. Also, yes the guide is more involved than simple delegation, but manual delegation is part of the guide and can be used for more than just creating pools.  
> **username_0**: I still don't understand where the stake verification key comes from. I've tried going through the guide and was unsuccessful because it's incomplete.  
> **username_1**: Cardano has payment and staking keypairs (public and private) which you combine to build shelley-era addresses. You can create this keypairs manually using cardano-cli, or import them from an existing wallet  
> **username_0**: So you could generate a staking keypair for the purpose of registering and then discard the private key?  
> **username_1**: No, the staking private key is needed for delegating/redelegating to pools, as well as for withdrawing rewards to your main address. Read more about cardano keypairs here: https://developers.cardano.org/docs/operate-a-stake-pool/cardano-key-pairs/  
> **username_0**: This doesn't make any sense though because the staking key is disassociated with the wallet, it's just random  
> **username_0**: That article is stating that the stake key is *derived* from the wallet. So now I'm even more confused because this is contradictory to the information I was following in other articles.  
> **username_0**: This is what I was missing: https://cardano.stackexchange.com/questions/6045/get-wallet-skey-vkey-from-mnemonic  The stake key comes from the wallet itself.  
> **username_0**: Finally got it working!  

---

