Skip to content
Snippets Groups Projects
ale's avatar
ale authored
f41548da
History
Name Last commit Last update
README.md
go.mod
proxy.go

This tool is a small HTTP reverse proxy that adds authentication headers to outgoing HTTP requests. It is intended to provide access to an Ollama instance that is behind authentication, while the ollama client still has no direct auth support.

Save your ollama secret API key in a file somewhere, say ~/.ollama-api-key, and then run:

go install git.autistici.org/ula/ollama-auth-proxy@latest
~/go/bin/ollama-auth-proxy --token=$(cat ~/.ollama-api-key) --target=https://my.server.com &

The tool will bind to port 11434 on localhost and forward requests to the remote authenticated API. Now you can use the ollama CLI tool as if you had a locally running server.