Files
solana/docs/src/cli/choose-a-cluster.md
mergify[bot] e41460d500 feat: update api urls (backport #17186) (#17248)
* feat: update api urls

(cherry picked from commit 0f3045fb68)

* fix: cluster test

(cherry picked from commit ae5a10dffd)

* docs: update old devnet and testnet url references

(cherry picked from commit ec621e71dc)

* fix: update devnet and testnet urls

(cherry picked from commit 7be3171f4a)

Co-authored-by: Josh Hundley <josh.hundley@gmail.com>
2021-05-15 00:08:24 +00:00

44 lines
990 B
Markdown

---
title: Connecting to a Cluster
---
See [Solana Clusters](../clusters.md) for general information about the
available clusters.
## Configure the command-line tool
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.
For example to target the Devnet cluster, run:
```bash
solana config set --url https://api.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.