[PR #14679] [CLOSED] Feat(main): Use the environment variable PORT/HOST to dynamically print UI URL #23549

Closed
opened 2026-04-20 04:53:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/14679
Author: @TatsuhiroC
Created: 6/5/2025
Status: Closed

Base: mainHead: main


📝 Commits (2)

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 backend/open_webui/main.py (+7 -0)

📄 Description

Description

  • Modify the print(...) at the top level of backend/open_webui/main.py, to dynamically concatenate through the environment variables PORT (default 8080) and HOST (default localhost).

• This way, whether the user is using bash backend/start.sh, open-webui serve --port xxx, or directly uvicorn open_webui.main:app --port xxx, as long as PORT or/and HOST are exported to the environment variables, the access address prompt in the terminal will be consistent with the actual listening port.

Added

  • Modified backend/open_webui/main.py, changed to use the PORT and DISPLAY_HOST dynamically read from the above text.

Changed

  • [List any changes, updates, refactorings, or optimizations]

Deprecated

  • [List any deprecated functionality or features that have been removed]

Removed

  • [List any removed features, files, or functionalities]

Fixed

  • [List any fixes, corrections, or bug fixes]

Security

  • [List any new or updated security-related changes, including vulnerability fixes]

Breaking Changes

  • BREAKING CHANGE: [List any breaking changes affecting compatibility or functionality]

Additional Information

  • [Insert any additional context, notes, or explanations for the changes]
    • [Reference any related issues, commits, or other relevant information]

Screenshots or Videos

  • [Attach any relevant screenshots or videos demonstrating the changes]
SCR-20250604-rsoa

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/open-webui/open-webui/pull/14679 **Author:** [@TatsuhiroC](https://github.com/TatsuhiroC) **Created:** 6/5/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`1079108`](https://github.com/open-webui/open-webui/commit/107910880bf462186d02f125766d794a9e185ee1) Update default localhost link - [`377d3a7`](https://github.com/open-webui/open-webui/commit/377d3a7ddfb2d5504642b11aa8d282ac9f3ea8cc) Update main.py ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/main.py` (+7 -0) </details> ### 📄 Description ### Description - Modify the print(...) at the top level of backend/open_webui/main.py, to dynamically concatenate through the environment variables PORT (default 8080) and HOST (default localhost). • This way, whether the user is using bash backend/start.sh, open-webui serve --port xxx, or directly uvicorn open_webui.main:app --port xxx, as long as PORT or/and HOST are exported to the environment variables, the access address prompt in the terminal will be consistent with the actual listening port. ### Added - Modified backend/open_webui/main.py, changed to use the PORT and DISPLAY_HOST dynamically read from the above text. ### Changed - [List any changes, updates, refactorings, or optimizations] ### Deprecated - [List any deprecated functionality or features that have been removed] ### Removed - [List any removed features, files, or functionalities] ### Fixed - [List any fixes, corrections, or bug fixes] ### Security - [List any new or updated security-related changes, including vulnerability fixes] ### Breaking Changes - **BREAKING CHANGE**: [List any breaking changes affecting compatibility or functionality] --- ### Additional Information - [Insert any additional context, notes, or explanations for the changes] - [Reference any related issues, commits, or other relevant information] ### Screenshots or Videos - [Attach any relevant screenshots or videos demonstrating the changes] - <img width="825" alt="SCR-20250604-rsoa" src="https://github.com/user-attachments/assets/6b2e59aa-1342-47a9-858f-37cada0db05d" /> ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-20 04:53:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#23549