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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Signing in Production

> Where signing keys live in a production Solana application, and how to choose between local keys, browser wallets, cloud KMS/HSM, and managed signing backends.

A transaction only executes if it carries a valid
[signature](/developers/docs/core/transactions/transaction-structure#signatures) from every
required signer. During local development you usually hold that key as a
[`Keypair`](/developers/cookbook/wallets/create-keypair) and sign directly. In
production the important question is different: **where does the private key
live, and who is allowed to authorize a signature with it?**

<Warning>
  Never embed private keys in client-side code, bundle them into a frontend, or
  commit them to source control. Anyone who obtains a key gains full control of
  that account's funds.
</Warning>

## Signing approaches

| Approach                  | Where the key lives                                     | Who signs                                          | Best for                                                      |
| ------------------------- | ------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------- |
| **Local keypair**         | A file or environment variable on the machine           | Your code, directly                                | Local development, tests, CI                                  |
| **Browser wallet**        | The end user's wallet (e.g. Phantom, Solflare)          | The end user, per transaction                      | Frontend dApps where users sign their own transactions        |
| **Cloud KMS / HSM**       | A hardware-backed key service (AWS KMS, GCP KMS, Vault) | Your backend requests a signature from the service | Backend services, treasury operations, regulated environments |
| **Managed / MPC wallets** | Split or custodied across a provider's infrastructure   | The provider co-signs according to your policy     | Embedded wallets, approval workflows, institutional custody   |

The local keypair is the only approach that puts raw key material inside your
application. Every production approach keeps the key in dedicated infrastructure
and asks that infrastructure to sign on your behalf.

## Backend signing

When a server needs to sign (paying fees, sending program transactions, or
operating a treasury), use a dedicated key-management backend rather than a raw
keypair. The Solana Foundation maintains [Keychain](/developers/docs/tools/keychain), a
unified signing library (Rust, TypeScript, Python, and Go) that exposes one
`SolanaSigner` interface across every backend in the table above: Memory,
HashiCorp Vault, AWS KMS, GCP KMS, Fireblocks, Privy, Turnkey, CDP, Crossmint,
Dfns, Para, Openfort, Utila, and Fordefi.

Because the interface is shared across backends, you can develop locally with an
in-memory key and switch to a production backend through configuration, without
rewriting application code (backends that broadcast for you, such as Crossmint,
are called through a sign-and-send path instead). Keychain is compatible with
[`@solana/kit`](/developers/docs/clients/official/javascript), the
[Rust SDK](/developers/docs/clients/official/rust), `solders` (Python) and `solana-go` v2
(Go).

<Columns cols={2}>
  <Card title="Keychain" href="/developers/docs/tools/keychain">
    Unified signing across local keys, KMS, HSM, and managed wallet backends.
  </Card>
  <Card
    title="Choosing a backend"
    href="/developers/docs/tools/keychain/choosing-a-backend"
  >
    Compare custody models and pick the right signing backend for your app.
  </Card>
</Columns>

For the full production checklist — key management, RPC security, and monitoring
— see [Production Readiness](/developers/docs/tools/security#key-management).
