Skip to content

4 min read · Updated 27 November 2026

Use a Custom RPC URL in Apps, Bots and the Solana CLI

Default Solana RPC rate-limited? Set your OrbitFlare custom RPC URL in the Solana CLI, web3.js, @solana/kit, trading bots and wallets.

Plenty of Solana tools complain that the default public RPC is rate-limited and ask you for a custom RPC URL. With OrbitFlare, that URL is your region host followed by your license key, and it works the same way in the Solana CLI, in your code and in any app that has an RPC setting.

Your two URLs

HTTP:      https://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY
WebSocket: wss://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY

Swap fra for your own region code (they're listed in the first RPC request guide), and swap YOUR_API_KEY for the license key shown under Services in the dashboard. An app with one RPC field gets the HTTP URL; an app that also wants a WebSocket URL gets the wss:// one as well.

Set a custom RPC URL in the Solana CLI

solana config set --url "https://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY" \
  --ws "wss://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY"
solana config get
solana block-height

The quotes stop the shell from breaking the URLs at ?. When solana block-height returns a number, the CLI is talking to your endpoint.

web3.js and @solana/kit

Store the URLs in environment variables, not in your source:

export ORBITFLARE_RPC_URL="https://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY"
export ORBITFLARE_WS_URL="wss://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY"

With @solana/web3.js:

import { Connection } from "@solana/web3.js";

const connection = new Connection(process.env.ORBITFLARE_RPC_URL!, {
  commitment: "confirmed",
  wsEndpoint: process.env.ORBITFLARE_WS_URL,
});
console.log(await connection.getBlockHeight());

With @solana/kit:

import { createSolanaRpc, createSolanaRpcSubscriptions } from "@solana/kit";

const rpc = createSolanaRpc(process.env.ORBITFLARE_RPC_URL!);
const rpcSubscriptions = createSolanaRpcSubscriptions(process.env.ORBITFLARE_WS_URL!);
console.log(await rpc.getBlockHeight().send());

Our SDKs and CLI read ORBITFLARE_RPC_URL and ORBITFLARE_WS_URL too, so the same two variables serve both.

Trading bots, terminals and wallets

Put the whole HTTP URL, ?api_key= included, into the tool's RPC setting. Where a tool has a separate box for WebSockets, give it the WebSocket URL. Wallets that accept a custom RPC take the same HTTP URL.

Tools that send transactions can hit your plan's TPS before its RPS, so watch both; the difference is covered in RPS vs TPS.

Browser apps: lock the key to your domain

Anyone visiting a web page can read the URLs its code uses. When a web app has no choice but to call RPC from the browser, put your site's domain on the license's domain whitelist in the dashboard, so the key is accepted only from your pages. The safer route is to keep the key on your own server and proxy the calls. A key never goes into a public repository.

Still rate-limited?

Still seeing the warning? Make sure the app is actually using your URL; some only pick up a new setting after a restart. If the errors are now 429 from our endpoint, the app is exceeding your plan's limit, and the pricing page shows the larger plans. Solana RPC rate limits explains why public endpoints limit you in the first place.

Was this guide useful?

A useful starting point

Edit the brief, then copy it and open your assistant. Paste it into a new chat to get started.

Official sources included. You choose when to send.