[PR #11122] [CLOSED] Adds an env var to allow overriding the default port using an env var #23987

Closed
opened 2026-04-19 17:19:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11122
Author: @smsohan
Created: 6/18/2025
Status: Closed

Base: mainHead: main


📝 Commits (3)

  • d1003c8 Adds an env var to allow overriding the default port using an env var
  • 9725448 fixes the test
  • 75e5482 uses PORT env var since that's the standard in common cloud platforms

📊 Changes

2 files changed (+26 additions, -2 deletions)

View changed files

📝 envconfig/config.go (+8 -2)
📝 envconfig/config_test.go (+18 -0)

📄 Description

This will allow users to deploy the container / server and have it listen to a port other than the hard-coded port. This env var is used by default by Cloud Run / Kubernetes etc.


🔄 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/11122 **Author:** [@smsohan](https://github.com/smsohan) **Created:** 6/18/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`d1003c8`](https://github.com/ollama/ollama/commit/d1003c836eb8a5b4f069eedcc26c8af5e158ab43) Adds an env var to allow overriding the default port using an env var - [`9725448`](https://github.com/ollama/ollama/commit/97254489630eb142faf9a5c97c3e746abf55cacf) fixes the test - [`75e5482`](https://github.com/ollama/ollama/commit/75e5482d73aa4b1fa04ec083a7142c74bd1c1060) uses PORT env var since that's the standard in common cloud platforms ### 📊 Changes **2 files changed** (+26 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `envconfig/config.go` (+8 -2) 📝 `envconfig/config_test.go` (+18 -0) </details> ### 📄 Description This will allow users to deploy the container / server and have it listen to a port other than the hard-coded port. This env var is used by default by Cloud Run / Kubernetes etc. --- <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-19 17:19:16 -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#23987