Allow changing the port with --port flag #210
Open
+8
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to run openui on my home lab but I'm using the default port for another service, so I added the ability to configure the port with the
--port
flag. It defaults to 7878. Here an example of using it. Also allows you to set the port using the environment variablePORT
.Enhancements to port configuration:
backend/openui/__main__.py
: Added logic to parse the port number from the command-line argument--port
if provided, or fallback to thePORT
environment variable, defaulting to 7878 if neither is specified.backend/openui/__main__.py
: Updated theuvicorn.run
calls to use the dynamically determined port instead of the hardcoded value 7878. [1] [2]