Skip to content
Magma Devs
Smart Router Open Source

Deploy your own RPC proxy in three commands

Install the binary, point it at an RPC, send a request. Smart Router is an open-source RPC proxy with QoS-based provider selection, caching, hedging, retries, and cross-validation.

docs.magmadevs.com

Full guides, API reference, configuration, and deployment runbooks for Smart Router.

QuickstartConfigurationAPI referenceDeploymentSupported chains

Watch: Deploy Smart Router in 60 seconds

1

Get the binary

Clone the repo and build Smart Router from source.

git clone https://github.com/Magma-Devs/smart-router.git
cd smart-router
make install-all
Prefer a container? Jump to Docker.
2

Run

Generates a config from config/smartrouter_examples/ and starts the router on port 3360.

./scripts/pre_setups/init_smartrouter_eth.sh
3

Make a request

Send a JSON-RPC call through the router to confirm it's relaying traffic.

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

Deploy it your way

Same config shape across dev, staging, and prod. Pick the substrate that fits your stack.

Run with Docker

The repo ships a multi-stage Dockerfile that produces a distroless image with the smart-router binary as the entrypoint. Build it locally, then run:

docker run --rm \
  -p 3360:3360 \
  -p 7779:7779 \
  -v "$(pwd)/config:/smart-router/config:ro" \
  -v "$(pwd)/specs:/smart-router/specs:ro" \
  smart-router:local \
  rpcsmartrouter \
  /smart-router/config/smartrouter_examples/smartrouter_eth.yml \
  --geolocation 1 \
  --use-static-spec /smart-router/specs/
  • · 3360: request listener
  • · 7779: Prometheus metrics
  • · Mount your config/ and specs/ as read-only volumes.
Docker deployment docs

Licensing

Open source

Noncommercial license

Free to read, run, and modify for evaluation, research, and personal use. Source is on GitHub: read what's routing and validating your traffic.

Production use

Commercial license

Required to run Smart Router commercially or in production. Talk to us for pricing.

Where to next

Need a hand getting started? Join our Telegram community, reach out to our team or browse all plans.