You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug / Feature Request] Support secure custom domains and reverse proxies in Unsloth Desktop #17420
Unsloth Desktop returns 404 Not Found when the web GUI receives an X-Forwarded-Host header containing an external hostname, even with a valid loopback Host. This prevents using the GUI behind a custom-domain Cloudflare Named Tunnel after successful Cloudflare Access authentication.
Environment
Unsloth Desktop on Windows
AMD Radeon RX 9060 XT 16 GB
Local URL: http://127.0.0.1:8888/
Reverse proxy: Cloudflare Named Tunnel with HTTPS public hostname and Cloudflare Access
Reproduction
With Unsloth Desktop running locally, execute the following from PowerShell:
The 404 is returned with server: unsloth-studio and an empty response body.
With Cloudflare Access, login using a passkey succeeds, but the subsequent request to the public hostname returns 404. Changing the tunnel origin URL to http://127.0.0.1:8888 and overriding the HTTP Host header to 127.0.0.1:8888 did not resolve the 404.
Expected behavior / request
Please document or provide a secure, explicit opt-in way to access the authenticated desktop GUI through a user-managed reverse proxy (such as a Cloudflare Named Tunnel with a custom domain). For example, an allowlist of trusted public hostnames/proxies or guidance for routing to an appropriate authenticated remote listener.
I understand that loopback-only GUI restrictions can be intentional security protections; this report is not requesting that these protections be removed by default.
changed the title [-][Bug] Unsloth Desktop GUI returns 404 behind custom Cloudflare Tunnel with X-Forwarded-Host[/-][+][Bug / Feature Request] Support secure custom domains and reverse proxies in Unsloth Desktop[/+]on Nov 10, 2026
I'd like to work on this. I reproduced it: the desktop backend serves its web UI only to its own Cloudflare quick tunnel, the LAN listener, or a direct loopback browser, so a request relayed by your own proxy gets the empty 404. I plan to add an explicit opt-in, an allowlist of public hostnames (for example UNSLOTH_STUDIO_PROXY_HOSTS=studio.example.com), admitted only on the loopback listener and only when the request's Host is loopback or allowlisted, so DNS rebinding stays blocked and the default is unchanged. cc @danielhanchen
Fixed! Unsloth Desktop only served its web UI to its own tunnel, the LAN listener or a direct local browser, so a proxy you run yourself got an empty 404. Fixed in #17435: list your public hostnames in UNSLOTH_STUDIO_PROXY_HOSTS (on Windows setx UNSLOTH_STUDIO_PROXY_HOSTS studio.example.com, then quit and reopen Desktop), keep cloudflared's default Host header (no HTTP Host Header override), and sign in with the password from Settings > Remote access > Remote password.
To update: Unsloth Desktop will have an update banner. For Studio, use unsloth studio update. For Docker, use docker exec <container> unsloth-studio-update. Reopen if it still happens.
Activity
[-][Bug] Unsloth Desktop GUI returns 404 behind custom Cloudflare Tunnel with X-Forwarded-Host[/-][+][Bug / Feature Request] Support secure custom domains and reverse proxies in Unsloth Desktop[/+]debojyoti-dev commentedon Nov 10, 2026
I'd like to work on this. I reproduced it: the desktop backend serves its web UI only to its own Cloudflare quick tunnel, the LAN listener, or a direct loopback browser, so a request relayed by your own proxy gets the empty 404. I plan to add an explicit opt-in, an allowlist of public hostnames (for example
UNSLOTH_STUDIO_PROXY_HOSTS=studio.example.com), admitted only on the loopback listener and only when the request's Host is loopback or allowlisted, so DNS rebinding stays blocked and the default is unchanged. cc @danielhanchenStudio desktop: serve the web UI behind an allowlisted reverse proxy (f…
danielhanchen commentedon Nov 11, 2026
Fixed! Unsloth Desktop only served its web UI to its own tunnel, the LAN listener or a direct local browser, so a proxy you run yourself got an empty 404. Fixed in #17435: list your public hostnames in
UNSLOTH_STUDIO_PROXY_HOSTS(on Windowssetx UNSLOTH_STUDIO_PROXY_HOSTS studio.example.com, then quit and reopen Desktop), keep cloudflared's default Host header (no HTTP Host Header override), and sign in with the password from Settings > Remote access > Remote password.To update: Unsloth Desktop will have an update banner. For Studio, use
unsloth studio update. For Docker, usedocker exec <container> unsloth-studio-update. Reopen if it still happens.Studio desktop: serve the web UI behind an allowlisted reverse proxy (f…