lightweight go reverse proxy for ollama with bearer token authentication
go proxy ollama
1# Ollama Proxy 2 3A lightweight Go reverse proxy for Ollama with Bearer token authentication. 4 5## Features 6 7- Simple reverse proxy to Ollama API 8- Bearer token authentication 9- Easy configuration via environment variables 10 11## Installation 12 13```bash 14go install pkg.rbrt.fr/ollama-proxy@latest 15``` 16 17```bash 18go build -o ollama-proxy 19``` 20 21## Configuration 22 23The proxy is configured via environment variables: 24 25- `OP_AUTH_TOKEN` (required): Bearer token for API authentication 26- `OP_OLLAMA_URL` (optional): Ollama server URL (default: `http://localhost:11434`) 27- `OP_PORT` (optional): Proxy server port (default: `11433`) 28 29## Usage 30 31### Start the proxy 32 33```bash 34export OP_AUTH_TOKEN="your-secret-token" 35export OP_OLLAMA_URL="http://localhost:11434" 36export OP_PORT="11433" 37ollama-proxy 38```