Overview
Theanchor deploy command deploys each program in the workspace to the configured Solana cluster.
Command Syntax
Migration
Instead of:Options
Deploy only this program
Keypair of the program (filepath)Requires
--program-name to be specifiedDeploy from path
target/verifiable instead of target/deployDon’t upload IDL during deployment (IDL is uploaded by default)
Arguments to pass to the underlying
solana program deploy commandExamples
Deploy All Programs
Deploy Specific Program
Deploy with Custom Keypair
Deploy Verifiable Build
Deploy Without IDL
Pass Solana CLI Arguments
Deployment Process
- Reads program configuration from
Anchor.toml - Runs pre-deploy hooks (if configured)
- Deploys each program binary to the cluster
- Uploads IDL for each program (unless
--no-idl) - Runs post-deploy hooks (if configured)
Configuration
Programs are configured inAnchor.toml:
Cluster Selection
The deployment cluster is determined by the provider configuration:IDL Upload
By default, the IDL is uploaded during deployment, making it available on-chain for clients to fetch. This allows:- Automatic client generation
- Type-safe interactions
- On-chain program introspection
Upgrade Authority
The wallet specified inAnchor.toml must be the upgrade authority for the program. On first deployment, this wallet becomes the upgrade authority automatically.
Notes
The deprecation warning will be shown each time you run
anchor deploy. Migrate to anchor program deploy for continued support.See Also
- anchor program deploy - Recommended replacement with more features
- anchor program upgrade - Upgrade existing programs
- anchor build —verifiable - Create verifiable builds