Skip to content

[Bug] On web browser, UI returns 404 on loopback (127.0.0.1 / localhost) but serves fine on LAN IP #10786

Closed

Description

@Dhrhciebcy

Environment

Where are you using Unsloth?

  • Unsloth desktop application

Operating system and version: Windows 11

GPU model(s) and accelerator backend: NVIDIA CUDA

Versions:

  • Unsloth: v0.1.808-beta
  • Package: 2026.9.4
  • Desktop: 0.1.808-beta
  • llama.cpp: custom build (TheTom), commit 30d6881

What happened?

When I open http://127.0.0.1:8888 or http://localhost:8888 in the browser, the server responds with 404 Not Found. The exact same request to http://192.168.1.x:8888 (the machine's LAN IP) returns 200 and serves the full UI. Both URLs hit the same process on the same port; the only difference is the HTTP Host header.

This blocks the microphone / speech-dictation feature, because Chrome only grants getUserMedia() in a secure context — and plain-HTTP LAN IPs are not secure contexts, while localhost/127.0.0.1 are.

Setup that triggers it:

  • Unsloth Desktop app, latest version (updated same day)
  • Port 8888 (default), also reproduced on a custom port (777)
  • LAN access toggle: tested both on and off — no difference
  • netstat confirms the process is LISTENING on both 127.0.0.1:8888 and 192.168.1.x:8888 (same PID)

Steps to reproduce:

  1. Start Unsloth Studio via the Desktop app (default settings).
  2. In a terminal, run:
    curl -s -o NUL -w "%{http_code}\n" http://127.0.0.1:8888/
    curl -s -o NUL -w "%{http_code}\n" http://192.168.1.x:8888/
    
  3. Observe: 404 on loopback, 200 on LAN IP.

Expected behavior:

Loopback (127.0.0.1 / localhost) serves the UI (200), just like the documented default. The official docs and install flow both direct users to open http://127.0.0.1:8888. Loopback is also a secure context in browsers, which is required for the microphone / speech-dictation feature to work without extra flags or HTTPS.

Actual behavior:

http://127.0.0.1:8888/ and http://localhost:8888/ → 404.
http://192.168.1.x:8888/ → 200 (full UI loads).

The only variable that differs between the two requests is the Host header. No server-side setting, toggle, or flag in the Desktop app changes this behaviour.

Model and operation involved:

Not model-specific — this is a frontend-serving / routing issue at the HTTP layer, before any inference. Affects all models and all operations (chat, dictation, etc.) when accessed via loopback.

Diagnostics and logs

Desktop application

none

curl output

>curl -s -o NUL -w "%{http_code}\n" http://127.0.0.1:8888/
404

>curl -s -o NUL -w "%{http_code}\n" http://192.168.1.x:8888/
200

netstat (port 8888)

TCP    127.0.0.1:8888         0.0.0.0:0              LISTENING       <PID>
TCP    192.168.1.x:8888        0.0.0.0:0              LISTENING       <PID>

(Both lines show the same PID — a single process listening on both interfaces)

Activity

  1. added
    feature request
    on Sep 11, 2026
  2. added 3 commits that reference this issue on Sep 13, 2026
    3a39863
    2e2cbaa
    fac6c70
  3. added a commit that references this issue on Oct 1, 2026
    dace5df
  4. added a commit that references this issue on Oct 1, 2026
    9dd4977
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfeature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions