Skip to content

fix(security): bind orangecat to localhost only, not every interface - #830

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/bind-localhost-only
Aug 29, 2026
Merged

fix(security): bind orangecat to localhost only, not every interface#830
github-actions[bot] merged 1 commit into
mainfrom
fix/bind-localhost-only

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

Summary

launch.sh did unset HOSTNAME before starting the standalone server. That does not default to localhost — Next's standalone server reads HOSTNAME as the bind address, and unsetting it falls back to Next's own default, 0.0.0.0 (every interface). Confirmed against the actual bind on the box: orangecat-app was listening on 0.0.0.0:4003, not 127.0.0.1:4003 like every other app in the fleet.

Not an active incident — ufw's default-deny only allows 22/80/443, so the port was never actually internet-reachable — but relying on the firewall alone to cover a bind-address mistake is exactly the kind of thing that breaks quietly the day firewall config changes for an unrelated reason.

Already applied directly to the running box — this file is vendored TO the box, not FROM it on regular deploys (deploy-selfhost.sh preserves whatever launch.sh is already there rather than overwriting it from the repo, per its own comment). This PR is the repo catching up to what's already live, verified with 5 repeated health checks post-restart, so the next full box provision starts from the correct file instead of reintroducing the bug.

Same fix shipped for fleetcrown (bitbaum/fleetcrown#437) — that repo had the identical bug, independently.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN

launch.sh did `unset HOSTNAME` before starting the standalone server. That
does not default to localhost — Next's standalone server reads HOSTNAME as
the bind address, and unsetting it falls back to Next's own default,
0.0.0.0 (every interface). Confirmed against the actual bind on the box:
orangecat-app was listening on 0.0.0.0:4003, not 127.0.0.1:4003 like every
other app in the fleet.

Not an active incident — ufw's default-deny only allows 22/80/443, so the
port was never actually internet-reachable — but relying on the firewall
alone to cover a bind-address mistake is exactly the kind of thing that
breaks quietly the day firewall config changes for an unrelated reason.

Already applied directly to the running box (this file is vendored TO the
box, not FROM it on regular deploys — deploy-selfhost.sh preserves whatever
launch.sh is already there rather than overwriting it from the repo, per
its own comment). This commit is the repo catching up to what's already
live, so the next full box provision starts from the correct file instead
of reintroducing the bug.

Same fix shipped for fleetcrown (bitbaum/fleetcrown#437) — this repo had
the identical bug, independently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN
@github-actions
github-actions Bot merged commit cc6038b into main Aug 29, 2026
6 checks passed
@github-actions
github-actions Bot deleted the fix/bind-localhost-only branch August 29, 2026 05:39
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