
Ollama has no auth. I got tired of it and built a fix.
Been self-hosting Ollama for a while and kept putting off the "anyone can hit my API" problem. Finally just open-sourced a small proxy that sits in front of it and checks an API key. That's it.
Bearer token or X-API-Key, full passthrough, nothing else changes. Ollama stays on an internal network and never gets exposed directly.
Also ships a Coolify compose if you want automatic HTTPS and a public URL without the hassle.
https://github.com/CurtisARP/ollama-auth
Feedback and stars welcome, it's intentionally tiny for your own implementations.