1

I am working with the Solana command-line tools and I need to point them at my own RPC node instead of the default public endpoint. I have tried this:

solana config set --url http://localhost:8899

When I run commands such as solana balance or solana slot they use the default cluster.

  1. How do I verify which RPC endpoint the CLI is targeting?

  2. Switch it to my local endpoint

  3. Ensure solana-keygen picks it up

1 Answer 1

2

You can verify your current endpoint by the following command

solana config get

Look for the RPC URL in the output.

The command you have tried should work but ensure your validator is actually running on 8899. Use the confirmed flag to ensure the config change is saved.

solana config set --url http://localhost:8899 --confirmed

solana-keygen reads from the config file located at ~/.config/solana/cli/config.yml

Using solana config set updates this file. Hope that clarifies your question.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.