solana/docs/src/cli/choose-a-cluster.md

44 lines
986 B
Markdown
Raw Normal View History

---
title: Connecting to a Cluster
---
2020-04-21 16:59:09 -07:00
See [Solana Clusters](../clusters.md) for general information about the
available clusters.
2020-04-21 16:59:09 -07:00
## Configure the command-line tool
2020-04-21 16:59:09 -07:00
You can check what cluster the Solana command-line tool (CLI) is currently targeting by
running the following command:
```bash
solana config get
```
Use `solana config set` command to target a particular cluster. After setting
a cluster target, any future subcommands will send/receive information from that
cluster.
2020-04-21 16:59:09 -07:00
For example to target the Devnet cluster, run:
```bash
solana config set --url https://devnet.solana.com
```
## Ensure Versions Match
Though not strictly necessary, the CLI will generally work best when its version
matches the software version running on the cluster. To get the locally-installed
CLI version, run:
```bash
solana --version
```
To get the cluster version, run:
```bash
solana cluster-version
```
Ensure the local CLI version is greater than or equal to the cluster version.