---
title: Deploying Programs
description: Best practices for deploying programs on Mainnet
---

If you're deploying a custom Solana program as part of your payment
infrastructure, there are additional considerations.

## Pre-deployment

- **Solana CLI version:** Ensure you are using the latest version of the
  [Solana CLI](https://solana.com/docs/intro/installation).
- **Program keypair:** Your program will have a different address on mainnet
  than devnet (unless you're reusing the same keypair). Update all references in
  your application config. Store your program keypair in a secure location (note
  that running `cargo clean` will likely delete your program keypair).
- **Initialize accounts:** If your program requires admin accounts, PDAs, or
  other state accounts, ensure these are created on mainnet before users
  interact with your application. Same for any Associated Token Accounts (ATAs)
  your program needs.

## Deployment Process

- **Buffer accounts:** Large programs deploy via buffer accounts. The
  `solana program deploy` command handles this automatically, but understand
  that deployment isn't atomic—if interrupted, you may need to recover or close
  buffer accounts.
- **Upgrade authority:** Create a
  [multisig](https://docs.squads.so/main/basics/what-is-a-multisig) and assign
  it as the
  [upgrade authority of your Solana program](https://docs.squads.so/main/navigating-your-squad/developers-assets/programs).
- **Rent:** Ensure your deployment wallet has enough SOL to cover rent-exempt
  minimums for all program accounts.
- **Verification:** [Verify](https://solana.com/docs/programs/verified-builds)
  your program to ensure that the executable program you deploy to Solana’s
  network matches the source code in your repository
