lightweight go reverse proxy for ollama with bearer token authentication
go
proxy
ollama
1[Unit]
2Description=Ollama Proxy - Bearer token authentication proxy for Ollama API
3Documentation=https://tangled.org/julien.rbrt.fr/ollama-proxy
4After=network-online.target
5Wants=network-online.target
6
7[Service]
8Type=simple
9Restart=on-failure
10RestartSec=5s
11
12# Environment variables
13Environment="OP_AUTH_TOKEN=your-secret-token-here"
14Environment="OP_OLLAMA_URL=http://localhost:11434"
15Environment="OP_PORT=11433"
16
17# Alternatively, use an environment file:
18# EnvironmentFile=/etc/ollama-proxy/config.env
19
20# Path to the binary
21ExecStart=/usr/local/bin/ollama-proxy
22
23[Install]
24WantedBy=multi-user.target