A self-hosted auth gateway for Ollama adds keys, quotas and routing
Regular-Forever5876 · reddit · 2026-07-20
The author built **ollama-gateway**, a self-hosted gateway in front of one or more Ollama servers to add **real authentication and access control**. Key features: - **Per-client API keys** with hashing, one-time display, revocation, and IP/CIDR restriction. - **Quotas and limits**: monthly token caps, rate limiting, and cost-capped lifetime trials. - **Multi-upstream routing**: map each key to a local or remote server, with automatic failover. - **Allowlists** for models and APIs across native Ollama, OpenAI-compatible, and Anthropic endpoints. - **Logging and monitoring**: per-request logs, usage charts, model breakdowns, and request-content inspection. - **Deployment/security**: LAN-only admin panel, Caddy TLS, Dockerized setup, encrypted remote tokens, and a pre-deploy security sweep. The project is source-available rather than OSI open source, with a 1B-token/month commercial threshold.
Related event: Self-hosted Gateway Adds Auth and Quotas for Ollama(2 posts)→
More from coding & agent
- Meta and Unity link AI workflows to Quest development across setup, input and validation — Vjeux · 2026-07-21
- AI Engineer World’s Fair spotlights Kids Day with 87 children learning to code — steveonjava · 2026-07-21
- OpenCodex lets developers swap multiple model providers inside one Codex harness — arrakis_ai · 2026-07-21
- Kimi K3 looks stronger and about 5× cheaper on a frontend dashboard task — OwariDa · 2026-07-21
- This Figma MCP bridge exports real assets into your repo without API tokens or rate limits — No_Mechanic_1368 · 2026-07-21
- Hermes agents are now holding daily standups without human involvement — Teknium · 2026-07-21