Kokoro-FastAPI icon indicating copy to clipboard operation
Kokoro-FastAPI copied to clipboard

Startup URL displays the default port instead of the configured port

Open adidev-c opened this issue 1 month ago • 2 comments

Describe the bug

The port passed through the CLI flag does not appear to be reflected in the web player URL printed during startup.

The URL seems to be generated using Settings.port, which is not updated by the CLI flag. Consequently, the displayed port may differ from the configured port.

Screenshots or console output

Image
Beta Web Player: http://0.0.0.0:8880/web/
Uvicorn running on http://0.0.0.0:3000

The startup output displays different port numbers for the web player URL and the Uvicorn server.

Command used to start the application:

uvicorn api.src.main:app --host "${HOST:-0.0.0.0}" --port "${PORT:-3000}"

Branch / Deployment used

  • Branch: master
  • Deployment: Local
  • Startup command: ./start-gpu.sh

Operating System

  • OS: Ubuntu Linux 24.04
  • Hardware: NVIDIA GPU
  • GPU model: NVIDIA RTX 3050 Laptop GPU
  • CUDA: pytorch:2.6.0-cuda12.6-cudnn9-runtime

Additional context

The issue appears to be related to how the configured port is passed to the function that prints the startup information. Specifically, it appears to read Settings.port instead of using the effective port provided through the CLI flag.

I ran this program without using uv, but it is unlikely to be the direct cause of this port discrepancy

The expected behavior is for the printed web player URL to reflect the effective port configured for the web player.

I have attached a screenshot showing the startup output.

adidev-c avatar Oct 10 '26 13:10 adidev-c

Opened a fix in #546: adds a helper that reads the actual port from the command-line arguments at startup, so the web player URL in the log reflects whatever port uvicorn was told to bind to rather than always showing the default.

Christian-Sidak avatar Oct 11 '26 04:10 Christian-Sidak

Will be merged in on next release shortly, thanks again for the fix @Christian-Sidak

remsky avatar Oct 22 '26 06:10 remsky