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
- Anthropic researcher: 99% of engineers now run swarms of 300+ self-improving agents — AlishaOutridge · 2026-09-11
- Gergely Orosz: Shipping 10x PRs With AI Agents, Sites Fill With Small Regressions — ducha_aiki · 2026-09-11
- Same Echo Maze prompt, three frontier models: all passed visually but shipped the same hidden bug — eyishazyer · 2026-09-11
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11
- agents-best-practices: a provider-neutral Agent Skill for designing and auditing agentic harnesses — tom_doerr · 2026-09-11