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
- Soft Clamp cuts tool-call overuse in multi-teacher distillation, from 13.7% to 9.0% — antgroup · 2026-07-21
- Agent harness memory loss and compaction are still a major usability problem — adityaag · 2026-07-21
- SpecJudge runs locally on Ollama to pick the right-sized AI model for your project — jokiruiz · 2026-07-21
- A developer maps out six design rules for CLIs that humans and AI agents can both use — yujiezha · 2026-07-21
- A coding-agent skill that forces ADHD-friendly, answer-first output — ayghri · 2026-07-21
- A set of agent skills for CAD, robotics, and hardware design — earthtojake · 2026-07-21