-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
OBEY API Gateway offers multiple deployment methods. Pick the one that matches your environment.
The easiest way to get started on Windows.
- Download the latest release — choose the installer (
.exe) or the portable zip - Run the installer or extract the zip to your preferred location
- Double-click
ai-gateway.exe
The gateway starts on http://localhost:8080 and opens the dashboard automatically on first launch.
The release build includes system tray integration:
- Splash screen on first launch
- System tray icon with context menu
- Single-instance enforcement (second launch brings existing instance to front)
- Notification when already running
For always-on operation, register as a Windows service:
Using NSSM (recommended):
# Install NSSM from https://nssm.cc
nssm install ai-gateway "C:\path\to\ai-gateway.exe"
nssm set ai-gateway AppDirectory "C:\path\to"
nssm set ai-gateway AppEnvironmentExtra "OPENAI_API_KEY=sk-..."
nssm start ai-gatewayUsing sc.exe:
sc create ai-gateway binPath="C:\path\to\ai-gateway.exe"One-click cloud deployment:
Railway picks up the included Dockerfile and railway.toml automatically.
Steps:
- Click the deploy button above
- Set your provider API keys (
OPENAI_API_KEY, etc.) as environment variables in the Railway dashboard - You're live in under a minute
Persist your keys on Railway: Attach a Railway Volume mounted at
/data(the image'sAI_GATEWAY_DATA_DIR). Railway's container filesystem is ephemeral — without a volume the encryption master key regenerates on every redeploy and previously savedapi_key_encryptedvalues become undecryptable. Alternatively, supply keys via plain environment variables which never touch the encrypted store.
# Build the image
docker build -t obey-api-gateway .
# Run with config and env vars
docker run -d --name obey-api-gateway \
-p 8080:8080 \
-e OPENAI_API_KEY=sk-... \
-v $(pwd)/config.yaml:/app/config.yaml \
-v ai-gateway-data:/data \
obey-api-gateway --config /app/config.yamlPersist your keys: The image sets
AI_GATEWAY_DATA_DIR=/dataand declares it as a volume. Mount a named volume (or host path) at/dataso the encryption master key survives container restarts and rebuilds.
# docker-compose.yml
services:
obey-api-gateway:
build: .
ports:
- "8080:8080"
volumes:
- ./config.yaml:/app/config.yaml
- ai-gateway-data:/data
environment:
- OPENAI_API_KEY=sk-...
volumes:
ai-gateway-data:docker compose up -d# Pull latest source and rebuild
git pull origin master
docker build -t obey-api-gateway .
# Stop and remove old container (data volume is preserved)
docker stop obey-api-gateway && docker rm obey-api-gateway
# Start with new image
docker run -d --name obey-api-gateway \
-p 8080:8080 \
-e OPENAI_API_KEY=sk-... \
-v $(pwd)/config.yaml:/app/config.yaml \
-v ai-gateway-data:/data \
obey-api-gateway --config /app/config.yamlWith Compose:
git pull origin master
docker compose up -d --buildNever
docker volume rm ai-gateway-dataunless you intend to reset all stored secrets.
| Port | Purpose |
|---|---|
8080 |
Main gateway + admin + dashboard |
1455 |
OAuth callback server (for browser-based OpenAI login) |
- Rust (stable toolchain)
- Windows, Linux, or macOS
# Clone
git clone https://github.com/fdanobey/OBEY-api-gateway.git
cd OBEY-api-gateway
# Build (headless — no tray icon)
cargo build --release -p ai-gateway
# Build with Windows tray support
cargo build --release -p ai-gateway --features tray./target/release/ai-gateway --config ./config.yamlOn first run without a config file, a default config.yaml is created automatically.
After starting the gateway, verify it's running:
# Health check
curl http://localhost:8080/health
# Check available models
curl http://localhost:8080/v1/modelsOpen the dashboard in your browser:
http://localhost:8080/dashboard

Any OpenAI-compatible SDK or tool works:
# Environment variable
export OPENAI_API_BASE=http://localhost:8080/v1# Python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="unused")// TypeScript / Node.js
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'http://localhost:8080/v1',
apiKey: 'unused'
});# curl
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4-group","messages":[{"role":"user","content":"Hello!"}]}'- Configuration — customize the config file
- Providers — add your AI providers
- Admin Panel & Dashboard — explore the web UI