Skip to content

GETTING STARTED

Quick start

Smart Router is a reliability and security layer between your app and the chain. This page gets it running in three steps.

It monitors your RPC upstreams and optimizes routing in real time. This gives you a standard way to manage complex RPC setups, so you don't have to build one in-house. It works with any chain and any provider.

Three steps to a running router

1. Get the code

git clone https://github.com/Magma-Devs/smart-router.git
cd smart-router

2. Run

docker compose -f docker/docker-compose.yml up --build

This builds the image and starts the Ethereum example on port 3360. To run another chain, set SR_CONFIG (see Examples). To run a native binary or the wizard instead, see Run Smart Router.

3. Make a request

curl -X POST http://127.0.0.1:3360 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

The request goes through the full pipeline (upstream selection, retry, hedging, and caching) instead of going straight to a single RPC.

In a hurry? Use the wizard

make wizard starts an interactive TUI. It picks chains, collects upstreams, health-checks everything, writes the config, and brings up the stack in one pass. See Config wizard.

Where to next

  • Connect your app

    Point viem, ethers, web3.py, or cosmjs at your endpoint.

    Connect your app →

  • Configure routing & failover

    Tune upstream selection, retry, hedging, timeouts, and consensus.

    Configuration →

  • Supported chains

    148 chains, including Ethereum and Lava, each configured by a chain spec.

    Browse chains →

  • Why Smart Router?

    The problems it solves and how it compares to a plain proxy.

    Read the overview →