[PR #9131] Add API key authentication for Ollama server #75168

Open
opened 2026-05-05 07:36:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9131
Author: @michaelscottdev7
Created: 2/15/2025
Status: 🔄 Open

Base: mainHead: ollama-api-key-optional-args


📝 Commits (1)

  • c3e4d18 Add API key authentication for Ollama server

📊 Changes

4 files changed (+66 additions, -1 deletions)

View changed files

📝 cmd/cmd.go (+27 -1)
📝 envconfig/config.go (+3 -0)
📝 server/auth.go (+35 -0)
📝 server/routes.go (+1 -0)

📄 Description

  • Introduce optional API key authentication for the Ollama server
  • Add new flags to serve command for host, port, and API key configuration
  • Implement API key middleware to validate Bearer token authentication
  • Update environment configuration to support API key setting

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/9131 **Author:** [@michaelscottdev7](https://github.com/michaelscottdev7) **Created:** 2/15/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `ollama-api-key-optional-args` --- ### 📝 Commits (1) - [`c3e4d18`](https://github.com/ollama/ollama/commit/c3e4d18944c266a514593c1ae5cc12307fc4c778) Add API key authentication for Ollama server ### 📊 Changes **4 files changed** (+66 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+27 -1) 📝 `envconfig/config.go` (+3 -0) 📝 `server/auth.go` (+35 -0) 📝 `server/routes.go` (+1 -0) </details> ### 📄 Description - Introduce optional API key authentication for the Ollama server - Add new flags to `serve` command for host, port, and API key configuration - Implement API key middleware to validate Bearer token authentication - Update environment configuration to support API key setting --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 07:36:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#75168