Self-Hosting

Run 1Router on your own infrastructure

The entire control plane is source-available and self-hostable. Deploy in minutes with Docker or Kubernetes — no vendor lock-in, no data leaving your network, and a guaranteed conversion to Apache 2.0 for every release.

Quick Start

1

Clone the repository

bash
git clone https://github.com/1router/1router.git
cd 1router
2

Configure your providers

bash
# Set your API keys in .env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...
3

Deploy with Docker

bash
docker build -t 1router .
docker run -p 3000:3000 --env-file .env 1router
4

Or deploy to Kubernetes

bash
kubectl apply -f k8s/
# Namespace, Deployment, Service, and Ingress
# are all included in the k8s/ directory

Why Self-Host?

Full Control Plane

Run the entire routing layer — model selection, load balancing, fallbacks, and rate limiting — on your own hardware.

Data Sovereignty

No telemetry, no analytics sent home. Your usage patterns and API keys never leave your infrastructure.

Private Network

Deploy behind your VPN or firewall. Restrict access with your own auth layer, SSO, or IP allowlists.

Custom Models

Add your own fine-tuned models, local LLMs via Ollama, or private endpoints alongside hosted providers.

Your Own Storage

Use your own Postgres, Redis, or SQLite for usage tracking and billing. No external dependencies.

Open License

Released under FSL-1.1-Apache-2.0 with a guaranteed, irrevocable conversion to plain Apache 2.0 two years after each release. Use, modify, and self-host freely for internal, research, and educational purposes — full Apache 2.0 rights arrive on the two-year anniversary of every release.

Architecture

1

Client

OpenAI-compatible API requests

2

1Router Control Plane

Routing, load balancing, rate limiting, fallbacks

3

Provider Adapters

Translate requests to provider-specific formats

4

Your Infrastructure

Storage, auth, monitoring

Cloud or Self-Hosted?

1Router Cloud

  • ✓ Zero infrastructure to manage
  • ✓ Automatic updates and new models
  • ✓ Built-in monitoring and analytics
  • ✓ Global edge deployment
  • ✓ Pay-as-you-go pricing

Self-Hosted

  • ✓ Complete data sovereignty
  • ✓ No per-token fees — just your provider costs
  • ✓ Custom models and private endpoints
  • ✓ Full control over routing logic
  • ✓ Deploy behind your firewall