Skip to content

fix: retire the port bindings left over from StartOS 0.3.5; 34.0.4:4 → 34.0.4:5 - #157

Draft
MattDHill wants to merge 1 commit into
masterfrom
fix/retire-legacy-ui-port
Draft

MattDHill wants to merge 1 commit into
masterfrom
fix/retire-legacy-ui-port

Conversation

@MattDHill

@MattDHill MattDHill commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Summary

The 0.3.5 manifest (v30.0.11:manifest.yaml) mapped Tor 80 and 443 to container 80 and 443 and LAN 443 to container 8080, so the compat runtime that ran it on 0.4 bound all three on host main (SystemForEmbassy.exportNetwork takes the union of the Tor port-mapping targets and the LAN internal ports). Every 0.4-native version binds 80 alone. setupInterfaces ends its pass by disabling the bindings it did not declare rather than deleting them, so a server migrated from 0.3.5 still carries the 443 and 8080 records: enabled: false, holding their external ports and recomputing bridge addresses nothing listens on. Tor's migration attached the onion to 8080 (the LAN binding writes its onion ports last), so the address keeps resolving a dead target — Start9Labs/tor-startos#36.

up() retires both with retirePort, which returns their ports to the pool and deletes the records. Retiring is the signal Tor acts on: under Start9Labs/tor-startos#39 the onion attached to 8080 becomes unused — out of torrc and off the interface page, key kept — and Add Onion Service on the Web UI interface offers it back, hostname intact. The release note should say that once #39 ships. On an install that never carried the bindings, retirePort resolves false and nothing happens. The host and its domains stay, and port 80's own binding keeps the external ports it already holds, so no Nextcloud address changes.

Draft until the SDK 3.0 sweep lands here

retirePort ships in @start9labs/start-sdk 3.0.0 and its retireBinding effect in StartOS 0.4.0.2. Neither is released, and this repo's 3.0.0 bump belongs to the fleet sweep's PR rather than this one, so against 2.0.9 the type-check fails on exactly those two calls:

startos/versions/current.ts(16,18): error TS2339: Property 'retirePort' does not exist on type 'MultiHost'.
startos/versions/current.ts(17,18): error TS2339: Property 'retirePort' does not exist on type 'MultiHost'.

To finish once the sweep PR is in: rebase onto it, move the version past whatever master carries by then, get the build gate green, and verify on a 0.4.0.2 box against a server migrated from 0.3.5 that the main host has neither a 443 nor an 8080 binding afterwards and Nextcloud's addresses are unchanged. Not exercised on a box.

🤖 Generated with Claude Code

…→ 34.0.4:5

The 0.3.5 package mapped Tor 80 and 443 to container 80 and 443 and LAN
443 to container 8080, so the compat runtime bound all three on host
`main`; every 0.4 version binds 80 alone. setupInterfaces ends its pass
by disabling the bindings it did not declare rather than deleting them,
so a server migrated from 0.3.5 keeps the 443 and 8080 records:
enabled: false, holding their external ports and recomputing bridge
addresses nothing listens on. Tor's onion, which the migration attached
to 8080, keeps resolving that address (tor-startos#36).

up() retires both, which returns their ports to the pool and deletes the
records. On an install that never carried them, retirePort resolves false.

retirePort ships in start-sdk 3.0.0 with StartOS 0.4.0.2; the SDK bump is
the fleet sweep's PR, so this does not compile against 2.0.9 until that
lands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MattDHill
MattDHill force-pushed the fix/retire-legacy-ui-port branch from e1c8f96 to 3dfba02 Compare September 21, 2026 15:50
@MattDHill MattDHill changed the title fix: retire the UI port binding left over from StartOS 0.3.5; 34.0.4:4 → 34.0.4:5 fix: retire the port bindings left over from StartOS 0.3.5; 34.0.4:4 → 34.0.4:5 Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant