mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3402] [GUI] Let user pin the desktop app's port so localhost API clients survive updates #1376
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1376
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @couleurs256 on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3402
Description
First: thank you for the "stable window origin" work (fixed preferred port 47831) — it already solved most of my issues. This is a small follow-up on the edge case that remains.
Problem.
I run the Windows desktop app as the OpenAI-compatible endpoint for a local agent; the host port IS the API base URL (
http://127.0.0.1:<port>/v1). When 47831 is still held by the previous instance during an update,pick_stable_port()silently falls back to a random port. Two things break at once: every client config (base URL + key) must be redone by hand, and the window origin changes, so the app's own chat list/settings start empty — which the code comments inapps/desktop/src-tauri/src/main.rsalready note.What I'd like (goal, not implementation):
STRATA_WINDOW_PORTseems to be internal to the Linux window process, andSTRATA_PORTis overwritten by the launcher);What I do today: after each update I find the listening port in Strata's serving section. Observed on my Windows 11 machine updating v0.2.0-beta -> v0.2.1: the app stored most sessions on 47831 and one launch on a random port — the update where the old instance still held 47831. Not a deterministic reproduction, just what a normal update did.
Trigger detail: this happened through the in-app updater (GUI -> update). Since the updater relaunches the app while the previous host may still be draining its engines (and holding 47831), the fresh instance picks a random fallback port on that restart. Closing the app first isn't an option in that flow — the updater drives the quit/relaunch itself.
Thanks in advance, the app is awesome!
@hys17 commented on GitHub (Oct 20, 2026):
Following this as well. Couldn't figure out a way to customize the port number or host address either. Would love to have this feature so my previous configs on different machines would survive this update. The app looks great though!
@sadluck commented on GitHub (Oct 23, 2026):
Seconded, we need to be able to change the port. All my other engines (including older Strata versions) use 8000 and I really don't want to rewrite my harness jsons whenever I swicth between them.
@Soleone commented on GitHub (Oct 27, 2026):
For me it always seems to randomize the port, I can't get it stable so that I can configure my agent (pi). Seems somewhat urgent. Or am I missing something and there is a workaround for a stable port? I also always seem to have to check share on local network again, it doesn't stick.
Optimally I just want to launch the desktop app and load the model, maybe even some shortcut to load the last model quickly, and then move to my agent.
@couleurs256 commented on GitHub (Oct 27, 2026):
Thank you very much for this and so much more ! Updating to 0.2.7 right now.
@Niko1221 commented on GitHub (Oct 27, 2026):
Done in 0.2.7: Settings has an 'App port' setting (empty = automatic, 47831 when free). If the port is busy when Strata starts, it now says so in plain words instead of silently using another one.
Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
@hys17 commented on GitHub (Oct 27, 2026):
@Niko1221
THIS IS FANTASTIC! Thank you so much!
Noticed a little strange behaviour though.
By default, the local sharing is off, so every time I open the app, I'd need to turn on sharing again, which is fine.
However, since I've set the port number (e.g. 8085), when I turn on local sharing, the active port gets bumped by 1 (e.g. 8086).
Tested for a few restarts.
Was this intended?
Thanks again.