Logo
RPC Assistant

What are the Celo RPC endpoints for mainnet and testnet?

Summary

Celo RPC endpoints let developers connect to the Celo blockchain. Mainnet chain ID is 42220, testnet (Celo Sepolia) chain ID is 11142220. Free public endpoints exist but are rate-limited; for production apps, consider a dedicated RPC provider like OnFinality.

Celo RPC Endpoint Decision Checklist

Before connecting your application to Celo, verify these points:

CriterionWhat to checkWhy it matters
Network selectionMainnet (Chain ID 42220) vs Testnet (Chain ID 11142220)Prevents cross-network transaction errors
Public vs private RPCRate limits, reliability, and uptime SLAsPublic endpoints throttle requests; production apps need dedicated infrastructure
Endpoint securityHTTPS vs WS; credentials if using private nodeAvoids man-in-the-middle attacks and data leaks
Supported methodseth_call, eth_sendRawTransaction, eth_getLogs, etc.Ensure your dApp requirements are met
Archive data availabilityHistoric state access for analytics or explorersSome methods require archive nodes

What Is Celo and Why Do You Need an RPC Endpoint?

Celo is a mobile-first, EVM-compatible blockchain focused on financial inclusion. It uses a proof-of-stake consensus and features stablecoins like cUSD and cEUR. To interact with Celo — read balances, send transactions, or query smart contracts — you need a Remote Procedure Call (RPC) endpoint. Celo RPC endpoints act as the gateway between your dApp and the blockchain. Whether you're building a DeFi app, a payment system, or an NFT marketplace, selecting the right RPC endpoint is critical for performance and reliability.

Celo Mainnet RPC Configuration

The official Celo mainnet RPC endpoint is:

https://forno.celo.org
wss://forno.celo.org/ws

Chain details:

⚠️ Note: The public forno endpoint is rate-limited. For production workloads, use a dedicated RPC provider like OnFinality or other services that offer higher throughput and SLAs.

You can also add Celo mainnet to MetaMask using the following configuration:

{
  "chainId": "42220",
  "chainName": "Celo Mainnet",
  "rpcUrls": ["https://forno.celo.org"],
  "nativeCurrency": {
    "name": "CELO",
    "symbol": "CELO",
    "decimals": 18
  },
  "blockExplorerUrls": ["https://celoscan.io"]
}

Celo Testnet (Sepolia) RPC Configuration

Celo’s developer testnet is now based on Ethereum Sepolia, replacing the deprecated Alfajores testnet. The testnet RPC endpoint is:

https://forno.celo-sepolia.celo-testnet.org
wss://forno.celo-sepolia.celo-testnet.org/ws

Chain details:

MetaMask configuration:

{
  "chainId": "11142220",
  "chainName": "Celo Sepolia",
  "rpcUrls": ["https://forno.celo-sepolia.celo-testnet.org"],
  "nativeCurrency": {
    "name": "CELO",
    "symbol": "CELO",
    "decimals": 18
  },
  "blockExplorerUrls": ["https://celo-sepolia.blockscout.com"]
}

Faucet for Testnet

To obtain testnet CELO, use the following faucets:

Debugging Common Celo RPC Issues

1. Rate Limiting

If you see 429 Too Many Requests or 403 Forbidden, you are hitting rate limits on public endpoints. Solutions:

  • Switch to a dedicated RPC provider.
  • Implement request batching and caching.
  • Use WebSocket connections for real-time updates.

2. Incorrect Chain ID

Ensure you are using chain ID 42220 for mainnet and 11142220 for testnet. Mismatched chain IDs cause transaction errors.

3. Block Height Discrepancies

If your node reports a different block height than explorers, your RPC endpoint may be behind. Use a provider with load balancing and failover to stay synced.

4. WebSocket Connection Drops

Stable WebSocket connections are essential for event listening. If drops occur, consider a provider with dedicated WebSocket support and reconnection logic.

How to Choose a Celo RPC Provider for Production

When selecting an RPC provider for your Celo dApp, evaluate the following:

  • Throughput and Limits: Public endpoints are shared and rate-limited. Dedicated nodes offer higher request limits.
  • Archive Support: If you need historical state, ensure the provider offers archive node access.
  • WebSocket Support: For real-time data, pick a provider with stable WebSocket endpoints.
  • Global Latency: Choose providers with points-of-presence (PoPs) near your user base to reduce latency.
  • Pricing Model: Some providers charge per request, others per compute unit. Understand your usage patterns.

OnFinality provides Celo RPC endpoints with high availability, WebSocket support, and flexible pricing. Check our pricing page for details.

Testing Your Celo RPC Connection

Use a simple curl command to verify your RPC endpoint is responsive:

curl -X POST https://forno.celo.org \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Expected response:

{"jsonrpc":"2.0","id":1,"result":"0x459fbe"}

The result is the latest block number in hex. Convert to decimal to verify.

Key Takeaways

  • Celo mainnet uses chain ID 42220; testnet (Sepolia) uses 11142220.
  • Public endpoints like forno.celo.org are free but rate-limited.
  • For production dApps, choose a private RPC provider with SLAs.
  • Testnet faucets are available from Google Cloud and the Celo Foundation.
  • Always verify chain ID and endpoint availability before deployment.

Frequently Asked Questions

What is the Celo mainnet RPC URL?

The public endpoint is https://forno.celo.org. For dedicated access, use a provider like OnFinality.

How can I get Celo testnet tokens?

Use the Google Cloud Web3 faucet or the official Celo faucet at faucet.celo.org.

Does OnFinality support Celo?

Yes, OnFinality offers Celo mainnet RPC endpoints. See our [supported networks](/networks) for the full list.

What is the difference between Celo mainnet and Celo Sepolia?

Mainnet is the production network; Sepolia is a testnet using Ethereum Sepolia as its base layer, ideal for development.

How do I add Celo to MetaMask?

Use the chain configuration JSON provided above, or use ChainList to add it automatically.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started