Skip to main content
This command is deprecated since version 0.32.0. Use anchor program deploy instead for more control and features.

Overview

The anchor deploy command deploys each program in the workspace to the configured Solana cluster.

Command Syntax

Migration

Instead of:
Use:
See the Program Commands documentation for the full feature set.

Options

string
Deploy only this program
string
Keypair of the program (filepath)Requires --program-name to be specified
flag
default:"false"
Deploy from path target/verifiable instead of target/deploy
flag
default:"false"
Don’t upload IDL during deployment (IDL is uploaded by default)
string
Arguments to pass to the underlying solana program deploy command

Examples

Deploy All Programs

Deploy Specific Program

Deploy with Custom Keypair

Deploy Verifiable Build

Deploy Without IDL

Pass Solana CLI Arguments

Deployment Process

  1. Reads program configuration from Anchor.toml
  2. Runs pre-deploy hooks (if configured)
  3. Deploys each program binary to the cluster
  4. Uploads IDL for each program (unless --no-idl)
  5. Runs post-deploy hooks (if configured)

Configuration

Programs are configured in Anchor.toml:

Cluster Selection

The deployment cluster is determined by the provider configuration:
Override the cluster with:

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 in Anchor.toml must be the upgrade authority for the program. On first deployment, this wallet becomes the upgrade authority automatically.

Notes

Always verify you’re deploying to the correct cluster before running this command. Deployments to mainnet-beta are irreversible.
The deprecation warning will be shown each time you run anchor deploy. Migrate to anchor program deploy for continued support.
Use anchor program show <PROGRAM_ID> to view deployment information after deploying.

See Also