> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/solana-foundation/anchor/llms.txt
> Use this file to discover all available pages before exploring further.

# anchor deploy

> Deploy programs to a Solana cluster (deprecated, use anchor program deploy)

<Warning>
  This command is deprecated since version 0.32.0. Use `anchor program deploy` instead for more control and features.
</Warning>

## Overview

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

## Command Syntax

```bash theme={null}
anchor deploy [OPTIONS] [-- <SOLANA_ARGS>...]
```

## Migration

Instead of:

```bash theme={null}
anchor deploy
```

Use:

```bash theme={null}
anchor program deploy
```

See the [Program Commands](/cli/deploy) documentation for the full feature set.

## Options

<ParamField path="--program-name" type="string">
  Deploy only this program
</ParamField>

<ParamField path="--program-keypair" type="string">
  Keypair of the program (filepath)

  Requires `--program-name` to be specified
</ParamField>

<ParamField path="--verifiable" type="flag" default="false">
  Deploy from path `target/verifiable` instead of `target/deploy`
</ParamField>

<ParamField path="--no-idl" type="flag" default="false">
  Don't upload IDL during deployment (IDL is uploaded by default)
</ParamField>

<ParamField path="solana_args" type="string">
  Arguments to pass to the underlying `solana program deploy` command
</ParamField>

## Examples

### Deploy All Programs

```bash theme={null}
anchor deploy
```

### Deploy Specific Program

```bash theme={null}
anchor deploy --program-name my_program
```

### Deploy with Custom Keypair

```bash theme={null}
anchor deploy --program-name my_program --program-keypair ./keys/program-keypair.json
```

### Deploy Verifiable Build

```bash theme={null}
anchor build --verifiable
anchor deploy --verifiable
```

### Deploy Without IDL

```bash theme={null}
anchor deploy --no-idl
```

### Pass Solana CLI Arguments

```bash theme={null}
anchor deploy -- --with-compute-unit-price 1000
```

## 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`:

```toml theme={null}
[programs.localnet]
my_program = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"

[programs.devnet]
my_program = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
```

## Cluster Selection

The deployment cluster is determined by the provider configuration:

```toml theme={null}
[provider]
cluster = "devnet"  # Or "localnet", "mainnet-beta", custom URL
wallet = "~/.config/solana/id.json"
```

Override the cluster with:

```bash theme={null}
anchor deploy --provider.cluster devnet
```

## 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

<Warning>
  Always verify you're deploying to the correct cluster before running this command. Deployments to mainnet-beta are irreversible.
</Warning>

<Info>
  The deprecation warning will be shown each time you run `anchor deploy`. Migrate to `anchor program deploy` for continued support.
</Info>

<Tip>
  Use `anchor program show <PROGRAM_ID>` to view deployment information after deploying.
</Tip>

## See Also

* [anchor program deploy](/cli/deploy) - Recommended replacement with more features
* [anchor program upgrade](/cli/deploy) - Upgrade existing programs
* [anchor build --verifiable](/cli/build) - Create verifiable builds
