OmniRoute is a self-hosted AI gateway: a single OpenAI-compatible endpoint that routes requests across many LLM providers, with smart routing, load balancing, retries and fallbacks. It runs entirely on your own hardware via npm, Docker, desktop or phone. This guide walks you through installation, first-run setup, and connecting your coding tools — all based on OmniRoute's official docs.

Contents

  1. Prerequisites
  2. Install OmniRoute (npm / Docker / source)
  3. First-run setup & dashboard
  4. Connect Claude Code / Codex / Cursor / Cline / Copilot
  5. Verify with omniroute doctor
  6. Handy CLI commands
  7. FAQ

Step 1Prerequisites

Step 2Install OmniRoute

Option A — npm (global)

npm install -g omniroute

Option B — Docker

docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
  -p 20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest

This maps port 20128 and persists data in the omniroute-data volume.

Option C — From source

cp .env.example .env && npm install
PORT=20128 npm run dev

Step 3First-run setup & dashboard

Run the guided first-run wizard:

omniroute setup

Then start the gateway + dashboard:

omniroute

By default OmniRoute serves on port 20128:

Step 4Connect your coding tool

OmniRoute exposes an OpenAI-compatible endpoint, so any tool that accepts a custom base URL works. In your tool's settings:

Compatible tools include Claude Code, Codex, Cursor, Cline, Copilot and Continue.

Step 5Verify your setup

Diagnose providers, ports and native dependencies:

omniroute doctor

For an interactive chat client in the terminal:

omniroute chat

Handy CLI commands

OmniRoute ships a command-line cockpit. A few useful ones:

Additional command groups referenced in the docs include providers, oauth, keys, models, cache, compression, cost, usage, health, logs, mcp and a2a.

Config & data location: OmniRoute stores its database and config in DATA_DIR (defaults to ~/.omniroute). Useful env vars: PORT (default 20128) and REQUIRE_API_KEY (default false). Credentials are encrypted at rest with AES-256-GCM.

FAQ

How do I install OmniRoute?

npm: npm install -g omniroute; Docker: the docker run … diegosouzapw/omniroute:latest command above; or from source with cp .env.example .env && npm install then PORT=20128 npm run dev.

What port does it use?

20128 by default (dashboard at http://localhost:20128, API at /v1); change it with PORT.

How do I connect my coding tool?

Base URL http://localhost:20128/v1, API key from Dashboard → Endpoints, model auto.

Where is data stored?

DATA_DIR, defaulting to ~/.omniroute; credentials encrypted with AES-256-GCM.

Where are the full docs?

This guide covers install and first connect. For provider-specific setup, advanced commands and options, see the official repo: github.com/diegosouzapw/OmniRoute.

This guide is based on OmniRoute's public materials (GitHub: diegosouzapw/OmniRoute and its README). Commands and ports follow the official docs; OmniRoute evolves, so defer to the latest official documentation if anything differs. Written by NGJOO AI Lab, updated 2026-05-26.