Prerequisites: Ensure you have Go 1.25+ and Make installed on your system. If you prefer Docker, check out the Docker Guide.
Getting Up and Running
Build the Binary
Compile the This will place the executable in the
onr binary using the provided Makefile:bin/ directory or your $GOPATH/bin. If it’s globally available, you can simply run onr.Initialize Configuration Files
Open Next Router relies on three main YAML configuration files. You can start with the defaults provided in the repository.
onr.yaml (Server Config)
onr.yaml (Server Config)
Main server configurations including ports, logger, and paths to other config files.
keys.yaml (Authentication & Routing)
keys.yaml (Authentication & Routing)
Defines your downstream API keys, rate limits, and which DSL routing profile to apply.
models.yaml (Provider Secrets)
models.yaml (Provider Secrets)
Safely store the actual upstream API keys (e.g., OpenAI, Anthropic tokens) required to dispatch requests.
Run Configuration Tests
It’s always a good idea to validate your configuration syntax before starting the server:If everything is correct, you’ll see a
Configuration is valid message.Start the Gateway
Launch the router:You should see the server boot up and begin listening on
http://localhost:3300.Next Steps
Now that you have traffic flowing, explore these essential topics to unlock the power of ONR:DSL Overview
Learn how to write dynamic routing rules, rewrites, and token tracking.
Load Balancing & Fallbacks
Configure multi-provider failover for maximum resilience.
Observability
Set up Promtail, Loki, and Grafana for comprehensive gateway monitoring.
Admin Panel
Manage keys and live DSL configurations visually.