|
1 |
| -# ollama-token-api |
| 1 | +# Ollama Token API |
2 | 2 |
|
3 |
| -Ollama reverse proxy that allows for bearer token authentication. |
| 3 | +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. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | +- [Features](#features) |
| 7 | +- [Installation](#installation) |
| 8 | + - [Using Docker (Recommended)](#using-docker-recommended) |
| 9 | + - [Manual Installation](#manual-installation) |
| 10 | +- [Usage](#usage) |
| 11 | +- [Contributing](#contributing) |
| 12 | +- [License](#license) |
| 13 | + |
| 14 | +## Features |
| 15 | + |
| 16 | +- **Bearer Authorization:** Implement OAuth2 bearer token authentication for Ollama. |
| 17 | +- **MongoDB Token Storage:** Store and retrieve tokens from a MongoDB database. |
| 18 | +- **Honol Reverse Proxying:** Use Hono to reverse proxy requests to the Ollama server. |
| 19 | +- **Highly Customizable:** Configurable via environmental variables or configuration files. |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +### Using Docker (Recommended) |
| 24 | + |
| 25 | +You can deploy this API using Docker. The official Docker image is available on both GitHub and our private registry. |
| 26 | + |
| 27 | +#### Pulling Docker Image from Public Registry |
| 28 | +```sh |
| 29 | +docker pull ghcr.io/clowdertech/ollama-token-api:latest |
| 30 | +``` |
| 31 | + |
| 32 | +Or, for a specific tag: |
| 33 | +```sh |
| 34 | +docker pull ghcr.io/clowdertech/ollama-token-api:<tag> |
| 35 | +``` |
| 36 | + |
| 37 | +#### Pulling Docker Image from Private Forgejo Registry |
| 38 | + |
| 39 | +If you aim to contribute or access the latest development builds, use our dedicated registry. |
| 40 | + |
| 41 | +```sh |
| 42 | +docker pull forgejo.clowdertech.com/clowdertech/ollama-token-api:master |
| 43 | +``` |
| 44 | + |
| 45 | +### Manual Installation |
| 46 | + |
| 47 | +TODO: Add detailed installation instructions for manual setup (including setting up MongoDB and Hono). |
| 48 | + |
| 49 | +## Usage |
| 50 | + |
| 51 | +Once installed, start using Ollama Token API by sending requests with appropriately authenticated bearer tokens. |
| 52 | + |
| 53 | +For additional configuration options or advanced usage, please refer to the following file: |
| 54 | +- [docs/configuration.md](docs/configuration.md) |
| 55 | + |
| 56 | +## Contributing |
| 57 | +Contributions are highly welcomed! If you wish to contribute to this project, please follow these steps: |
| 58 | + |
| 59 | +1. Fork this repository using Forgejo (https://forgejo.clowdertech.com/clowdertech/ollama-token-api). |
| 60 | +2. Create a new feature branch from `master`. |
| 61 | +3. Commit your changes following standard conventions. |
| 62 | +4. Push the branch to your fork and create a Pull Request. |
| 63 | + |
| 64 | +For more details on contribution guidelines, see: |
| 65 | +- [CONTRIBUTING.md](CONTRIBUTING.md) |
| 66 | + |
| 67 | +## License |
| 68 | +This project is licensed under the terms of the **Apache License**. See LICENSE file for full details. |
| 69 | + |
| 70 | +--- |
| 71 | +*Built with ❤️ by ClowderTech* |
0 commit comments