[PR #9130] [CLOSED] [IGNORE] Add API key authentication for Ollama server #38746

Closed
opened 2026-04-22 23:24:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9130
Author: @michaelscottdev7
Created: 2/15/2025
Status: Closed

Base: mainHead: ollama-api-key-and-cmd-args-support


📝 Commits (1)

  • 55aafad 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
  • Add environment variable support for API key configuration

🔄 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/9130 **Author:** [@michaelscottdev7](https://github.com/michaelscottdev7) **Created:** 2/15/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ollama-api-key-and-cmd-args-support` --- ### 📝 Commits (1) - [`55aafad`](https://github.com/ollama/ollama/commit/55aafad83366586530411dc86a169d45c1705672) 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 - Add environment variable support for API key configuration --- <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-04-22 23:24:51 -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#38746