Ollama reverse proxy that allows for bearer token authentication. https://git.clowdertech.com/clowdertech/ollama-token-api
  • Rust 96.6%
  • Dockerfile 3.4%
Find a file
MrScarySpaceCat c0e9357644
All checks were successful
Docker Publish / build (push) Successful in 3m10s
guh
2026-10-15 03:45:59 -04:00
.cargo rewrite to rust because i can 2026-10-15 01:03:29 -04:00
.forgejo/workflows hope this works 2026-09-17 22:26:26 -04:00
src guh 2026-10-15 03:45:59 -04:00
.dockerignore rewrite to rust because i can 2026-10-15 01:03:29 -04:00
.gitignore rewrite to rust because i can 2026-10-15 01:03:29 -04:00
Cargo.lock rewrite to rust because i can 2026-10-15 01:03:29 -04:00
Cargo.toml rewrite to rust because i can 2026-10-15 01:03:29 -04:00
docker-compose.yaml rewrite to rust because i can 2026-10-15 01:03:29 -04:00
Dockerfile i happen to be an idiot 2026-10-15 01:05:21 -04:00
LICENSE Add LICENSE file 2026-03-10 10:33:48 -04:00
README.md fix readme for lint 2024-12-28 09:37:53 -05:00

Ollama Token API

The ollama-token-api project aims to add bearer authentication to Ollama, allowing users to secure their access without needing different client libraries. It works by validating tokens stored in a MongoDB database and reverse proxying requests to the Ollama server using Hono.

Table of Contents

Features

  • Bearer Authorization: Implement OAuth2 bearer token authentication for Ollama.
  • MongoDB Token Storage: Store and retrieve tokens from a MongoDB database.
  • Honol Reverse Proxying: Use Hono to reverse proxy requests to the Ollama server.
  • Highly Customizable: Configurable via environmental variables or configuration files.

Installation

You can deploy this API using Docker. The official Docker image is available on both GitHub and our private registry.

Pulling Docker Image from Public Registry

docker pull ghcr.io/clowdertech/ollama-token-api:latest

Or, for a specific tag:

docker pull ghcr.io/clowdertech/ollama-token-api:<tag>

Pulling Docker Image from Private Forgejo Registry

If you aim to contribute or access the latest development builds, use our dedicated registry.

docker pull forgejo.clowdertech.com/clowdertech/ollama-token-api:master

Manual Installation

TODO: Add detailed installation instructions for manual setup (including setting up MongoDB and Hono).

Usage

Once installed, start using Ollama Token API by sending requests with appropriately authenticated bearer tokens.

For additional configuration options or advanced usage, please refer to the following file:

Contributing

Contributions are highly welcomed! If you wish to contribute to this project, please follow these steps:

  1. Fork this repository using Forgejo (https://forgejo.clowdertech.com/clowdertech/ollama-token-api).
  2. Create a new feature branch from master.
  3. Commit your changes following standard conventions.
  4. Push the branch to your fork and create a Pull Request.

For more details on contribution guidelines, see:

License

This project is licensed under the terms of the Apache License. See LICENSE file for full details.


Built with ❤️ by ClowderTech