Aptos Node Management & CLI Cheat Sheet
Staking (Validator Staking Pool)
Create Staking Pool (Validator Contract)
aptos stake create-staking-contract \
--operator <operator-address> \
--voter <voter-address> \
--amount 100000000000000 \
--commission-percentage 10 \
--profile <owner-profile>Initializes a staking pool (requires β₯1,000,000 APT stake). Commission 10 equals 10%.
Add Stake to Validator Pool
aptos stake add-stake --amount <amount> --profile <owner-profile>Adds more APT to an existing validatorβs stake.
Increase Stake Lockup
aptos stake increase-lockup --profile <owner-profile>Extends the lockup period for the staked funds (uses the maximum lockup by default).
Unlock Stake (Begin Unstaking)
Requests to unlock a portion of stake. The stake moves to pending_inactive and will become withdrawable after the lockup period ends.
Withdraw Stake (After Unlock)
Withdraws unlocked stake (must be in inactive state after lockup expiration).
Switch Operator Account
Changes the operator of the staking pool (the new operator should be running a node).
Switch Delegated Voter
Changes the designated voting account for governance (the new voter must have the same or longer lockup as the owner).
Request Staking Commission
Claims the validator operatorβs commission rewards. This must be called twice for each epochβs rewards: once before the lockup period ends (to initiate unlocking of commission), and once after the epoch/lockup ends (to actually withdraw the commission). Ensure both the operator and owner addresses are provided.
Update Commission Percentage
Updates the staking poolβs commission rate (owner only). For example, 1325 = 13.25%. Must be requested at least 7.5 days before the current lockup ends; new rate takes effect after the lockup expires and a new epoch begins (triggered by calling request-commission after lockup).
Set Commission Beneficiary (Operator)
Sets an address to receive the operatorβs commission rewards for this staking pool. Any commission accrued but not yet paid will be paid out to the new beneficiary upon the next distribution.
View Commission Beneficiary
Displays the current beneficiary address set for the operator.
Check Staking Pool Status
Shows details of your staking pool (state, pool_address, operator, voter, total_stake, commission %, etc.). Use the pool_address (resource account) in your nodeβs config. State will be Active if already in validator set or Pending_active if waiting for next epoch.
Delegation Pool (Multi-Delegator Staking)
Add Stake to Delegation Pool
Delegate coins to a validatorβs delegation pool at pool_address. Minimum 10 APT required to delegate. (plus a small fee, mostly refunded as rewards).
Unlock Delegated Stake
Initiates unstaking of delegated APT. The specified amount moves to a pending inactive state in the pool, and will become withdrawable after the lockup period ends.
Reactivate Stake (Cancel Unlock)
Reverses a pending unlock, moving the stake back to active status (before it becomes fully inactive).
Withdraw Inactive Stake
Withdraws your inactive stake from the delegation pool to your account (only funds that have completed the unlock period can be withdrawn).
Set Delegation Pool Operator (Owner)
Assigns a new operator for the delegation pool (owner only).The operatorβs account will run the validator node and earn the set commission on rewards.
Update Delegation Pool Commission
Changes the commission rate for the delegation pool (owner only). The value has two decimal places (e.g. 1325 = 13.25%). Must be initiated >7 days before epoch end; new rate takes effect after the current lockup cycle finishes and the owner calls synchronize_delegation_pool in the new epoch.
Set Commission Beneficiary (Delegation Pool Operator)
Sets an address to receive the operatorβs commission for all delegation pools this operator manages. The beneficiary can then unlock/withdraw the commission rewards on behalf of the operator.
View Delegation Pool Beneficiary
Shows the currently set beneficiary address for the operatorβs commission.
Find Delegation Pool Address (by Owner)
Returns the resource account address of the delegation pool owned by the given owner address (if one exists).
Check Delegation Pool Stake
Shows the total stake in the pool split by state: active, inactive, pending_active, pending_inactive.
Governance (On-Chain Proposals & Voting)
List Active Proposals
Displays all on-chain governance proposals and their details (proposal ID, status, etc.).
Vote on Proposal (Staking Pool Owner/Voter)
Casts a vote on a governance proposal using your stake poolβs voting power. Use the stake ownerβs profile (or delegated voterβs profile) and the stake poolβs address. Ensure your stakeβs lockup is at least as long as the proposal voting period.
Execute Approved Proposal
Anyone may execute a proposal that has passed and met quorum, to enact the changes on-chain. This will run the proposalβs payload (such as code upgrade or parameter change). Only use on proposals in "Passed" state.
Vote as Delegator (Delegation Pool)
Vote on a proposal with a delegation pool stake. You can specify an amount of voting power (in APT) up to your active stake. bool:true = YES, bool:false = NO.
Delegate Your Voting Power
Delegates your governance voting rights to another address. The delegated voter will vote on proposals using your stakeβs power. This change takes effect in the next lockup cycle.
View Delegated Voter
Shows which voter address is currently designated to vote on behalf of the given delegator in the pool.
Node Operations & Status
Update Validator Network Addresses
Updates your validatorβs on-chain network addresses (for validator node and its fullnode). Run this after editing your operator.yaml with the correct addresses. Changes take effect at the next epoch.
Update Consensus Key
Rotates the validatorβs consensus public key on-chain. Use the new key in your node config file before running this. Takes effect after the current epoch ends.
Join Validator Set
Signals that your validator (with an active stake pool) wants to join the consensus validator set. The validator will enter Pending_active state and will become an active validator at the next epoch boundary.
Leave Validator Set
Voluntarily removes your validator from the active set. The validator will move to an inactive state at the next epoch (or immediately if stake falls below minimum).
Check Validator Set Status
Displays the current on-chain list of validators. Look for your pool_address in the output. (For example, to see if youβre in pending or active set: aptos node show-validator-set | jq -r '.Result.pending_active[] | .pool_address' and likewise for .active_validators).
Check Validator Performance
Shows your validatorβs performance stats for recent epochs, including successful proposals and voting on governance, as well as rewards earned.
Analyze Performance (All Epochs)
Outputs a table of performance metrics for every epoch since genesis. You can grep for your pool address to find your validatorβs history.
Basic Node Health Check
Returns HTTP 200 if the nodeβs REST API is up and the node is healthy (latest ledger info is recent). A non-200 response or error indicates the node is unhealthy.
Check Sync Progress
Queries the nodeβs metrics to get the highest synced ledger version. Compare this number with the latest block height on an explorer; if itβs catching up, the node is syncing properly (Requires the metrics port, default 9101, to be accessible).
Check Peer Connectivity
Shows the count of outbound peer connections from your node. A healthy node should have a non-zero number of outbound peers. If itβs 0, your node isnβt connecting to the network (check network config or update to the latest release).
Get Node Ledger Info
Fetches basic ledger information from the nodeβs REST API, including the chain ID, current block height, and the nodeβs git commit hash (version).
Check Node Version (Binary)
If running a local binary, this outputs the Aptos node software version and commit hash (Not an Aptos CLI command, but the node binary itself).
View Running Docker Container (if using Docker)
Verifies the Aptos node container is running. Note the container NAME or ID and image tag (which indicates the release version).
Check Ledger DB Size (Docker)
Shows the storage used by the nodeβs ledger database inside the container. This helps monitor disk usage growth over time.
Check Ledger DB Size (Bare Metal)
If running natively on bare metal, check the data directory size (path may vary based on your config). Default ledger directory is /opt/aptos/data for many installations.
Tail Node Logs (Docker)
Streams the Aptos nodeβs logs in real-time. Useful for debugging issues (e.g., consensus, networking problems). Press Ctrl+C to stop.
Last updated