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

# Installation

> Install the Kora CLI, TypeScript SDK, and set up your development environment

> **Looking for the beta?** See
> [Beta Installation](/developers/docs/tools/kora/beta/installation) for Docker images and
> `kora-cli@2.2.0-beta.8`.

Get started with Kora by installing the CLI tool for operating a Kora node or
the TypeScript SDK for client applications interacting with a Kora node.

## System Requirements

### For CLI (Server)

- [**Rust**](https://www.rust-lang.org/tools/install): Version 1.89 or higher,
  or any version from 1.88 if you install with `--locked` (not required for
  Docker)

### For TypeScript SDK (Client)

- [**Node.js**](https://nodejs.org/en/download): Version 20.18 or higher
- [**TypeScript**](https://www.typescriptlang.org/download): Version 5.4 or
  higher (required by `@solana/kit` 6)

### Optional Dependencies

- [**Solana CLI**](/developers/docs/quickstart): Helpful for key
  generation and testing
- [**Docker**](https://docs.docker.com/get-started/): For containerized
  deployments

## Kora CLI

The Kora CLI is the primary way to run and manage Kora nodes. Choose your
preferred installation method:

### Option 1: Install from Cargo

Install directly from [crates.io](https://crates.io/crates/kora-cli) using
Cargo:

```bash
cargo install kora-cli --locked
```

`--locked` builds with the dependency versions Kora `v2.0.5` was released with.
Without it, Cargo picks the newest compatible dependency releases, and those
need Rust 1.89: on Rust 1.88 the install fails with
`rustc 1.88.0 is not supported by the following packages`.

### Option 2: Build from Source

Clone and build the latest stable version from source:

```bash
git clone https://github.com/solana-foundation/kora.git
cd kora
git checkout v2.0.5
make install
```

> **Note:** The `v2.0.5` tag uses a Makefile (`make install`, `make build`,
> `make test`). Its `make run` target doesn't start a server on `v2.0.5`; run
> `kora --config <kora.toml> rpc start --signers-config <signers.toml>` instead
> (see [Running the Server](/developers/docs/tools/kora#running-the-server)).
> The `just` recipes (for example `just install` and `just test`) only exist on
> `main` and the beta tags.

> **Note:** Kora's `main` branch is an integration branch and may contain
> unreleased or beta changes. Always checkout the latest stable release tag. See
> the [releases page](https://github.com/solana-foundation/kora/releases) for
> the latest stable version.

This will build and install the `kora` binary to your local Cargo bin directory.

### Option 3: Docker

Pull the official Docker image from
[GitHub Container Registry](https://github.com/solana-foundation/kora/pkgs/container/kora):

```bash
docker pull ghcr.io/solana-foundation/kora:latest
```

Run with your configuration files mounted:

```bash
docker run -v $(pwd)/kora.toml:/app/kora.toml \
  -v $(pwd)/signers.toml:/app/signers.toml \
  -p 8080:8080 \
  -e RPC_URL=<SOLANA_RPC_URL> \
  -e KORA_PRIVATE_KEY=<YOUR_PRIVATE_KEY> \
  ghcr.io/solana-foundation/kora:latest \
  kora --config /app/kora.toml \
  rpc start --signers-config /app/signers.toml
```

The image has no entrypoint and its default command is `kora`, so the arguments
must start with `kora`. The CLI reads the RPC endpoint from the `RPC_URL`
environment variable (it falls back to `127.0.0.1:8899` if the variable is
unset), so pass it with `-e RPC_URL=<SOLANA_RPC_URL>`. `kora.toml` is only read
when you pass `--config /app/kora.toml`. Replace `<SOLANA_RPC_URL>` with your
Solana RPC endpoint and set the environment variables your `signers.toml` references (for
example `KORA_PRIVATE_KEY`).

### Verify Installation

Verify the Kora CLI is installed correctly:

```bash
kora --version
```

## TypeScript SDK

Install the Kora TypeScript SDK for client applications:

```bash
npm install @solana/kora @solana/kit@^6.1 @solana-program/token@^0.12 \
  @solana-program/compute-budget@^0.13 \
  @solana/kit-plugin-instruction-plan@^0.6 @solana/kit-plugin-payer@^0.6 \
  @solana/kit-plugin-rpc@^0.6
```

### Peer Dependencies

`@solana/kora` 0.2.x declares `@solana/kit` `^6.1` and several Kit plugin
packages as peer dependencies. Install them with the version ranges above so the
peers resolve to supported releases.

**Kit 7 and later are not supported** by `@solana/kora` 0.2.x. Stay on
`@solana/kit` 6.x. You get an unsupported Kit when:

- your project already depends on `@solana/kit` 7 or later: `npm install` stops
  with an `ERESOLVE` peer dependency conflict
- you install with `--legacy-peer-deps` (or `legacy-peer-deps=true` in
  `.npmrc`): npm skips the peers, so the latest Kit is installed and
  `@solana/kora` fails to load with `ERR_MODULE_NOT_FOUND` for
  `@solana-program/token`
- you use pnpm without pinning `@solana/kit`: pnpm installs the latest Kit,
  only warns about the peer conflict, and importing `@solana/kora` fails with
  `does not provide an export named 'getMinimumBalanceForRentExemption'`. Pin
  the same versions as the npm command above.

In a fresh npm project, `npm install @solana/kora @solana/kit` also resolves
Kit 6, because npm installs the peers for you. The pinned command records each
peer in your `package.json`, which keeps a later install from moving them to an
unsupported version.

### Version Requirements

`@solana/kora` 0.2.x requires `@solana/kit` `^6.1` (6.1 or later, below 7) and
TypeScript 5.4 or later for all three clients: `KoraClient`, `koraPlugin()`,
and `createKitKoraClient()`. With `@solana/kit` 5, `npm install` fails with an
`ERESOLVE` peer dependency conflict.

See the [JSON-RPC API Overview](/developers/docs/tools/kora/json-rpc-api) for detailed
client usage examples.

### Verify SDK Installation

Verify your SDK installation with a simple connection test:

```typescript
import { KoraClient } from "@solana/kora";

async function testConnection() {
  const client = new KoraClient({ rpcUrl: "http://localhost:8080" }); // Replace with your Kora server URL

  try {
    const config = await client.getConfig();
    console.log("✅ Successfully connected to Kora server");
  } catch (error) {
    console.error("❌ Connection failed:", (error as Error).message);
  }
}

testConnection();
```

## Troubleshooting

### CLI Issues

**"kora: command not found"**: Ensure `~/.cargo/bin` is in your PATH:

```bash
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

**Build fails**: Update Rust to the latest stable version:

```bash
rustup update stable
```

### SDK Issues

**Peer dependency warnings**: Install the pinned Solana dependencies listed
above (`@solana/kit@^6.1` and the matching plugin and program packages).

**TypeScript errors**: Ensure your TypeScript version is 5.4+ and install type
definitions:

```bash
npm install --save-dev @types/node
```

**Connection refused**: Ensure your Kora server is running and accessible at the
specified endpoint.
