Self-hosted auth gateway for Ollama with quotas and routing
Regular-Forever5876 · reddit · 2026-07-20
The author built a self-hosted auth gateway for Ollama to solve the fact that Ollama has no built-in authentication.
- The gateway adds per-client API keys, hashed and shown only once, with revocation and IP/CIDR origin restrictions.
- It supports monthly token quotas, rate limits, and cost-capped trial keys.
- It can route requests across multiple upstream Ollama servers, with per-key mapping and automatic fallback.
- It also enforces model/API allowlists, blocks catalog-management calls like pull/delete, and provides usage logging, charts, and content inspection.
- The admin panel is LAN-only, server-rendered, Dockerized, and translated into all 24 official EU languages.
- The project is source-available rather than OSI open source: free to self-host commercially up to 1 billion tokens/month across all installs, after which a €29 one-time commercial license applies.
The post is both a technical product announcement and a monetization model case study for infra-side indie builders.
Related event: Self-hosted Gateway Adds Auth and Quotas for Ollama(2 posts)→
More from coding & agent
- Kolab Benchmark Uses Pro Screen Recordings to Show AI Agents Overestimate Collaboration Quality — minnesotanlp · 2026-10-27
- Dev argues Claude burns far more tokens than GPT models for the same coding work — haider1 · 2026-10-27
- Stop building agents that can't change models: stable contracts, external state, real evals — rseroter · 2026-10-27
- Cheap models can cost more in agent harnesses than frontier ones, researcher warns — vasuman · 2026-10-27
- Kanzo: A 5k-Line Rust Kanban Binary With MCP for Claude Code and Codex — allmudi · 2026-10-27
- 'A human approves everything' is a trap: approval fatigue and how to actually design safe agents — Efistoffeles · 2026-10-27