Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions scripts/fleetcrown-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,16 @@ fi

# Defaults for production server — override in .env.local if needed.
export PORT="${PORT:-3000}"
# HOSTNAME is a bash builtin (set to machine name) — unset it so the standalone
# server defaults to 0.0.0.0 and is reachable at 127.0.0.1 / localhost.
unset HOSTNAME
# HOSTNAME is a bash builtin (set to the machine name, e.g. "bitbaum") and
# Next's standalone server reads it as the bind address. `unset` does NOT
# make that default to localhost — it makes Next fall back to ITS OWN
# default, which is 0.0.0.0 (every interface). Found 2026-08-29: this left
# fleetcrown reachable on all interfaces (mitigated only by ufw's
# default-deny, which happened to block the port anyway — not something to
# rely on). Every other app in the fleet already does this correctly via
# sync-infra.sh's `HOSTNAME=127.0.0.1`; fleetcrown just never matched its
# own convention because it launches itself outside that shared script.
export HOSTNAME=127.0.0.1
# NEXTAUTH_URL must match the local URL so auth callbacks work.
export NEXTAUTH_URL="${NEXTAUTH_URL:-http://localhost:${PORT}}"
export NEXTAUTH_SECRET="${NEXTAUTH_SECRET:-${AUTH_SECRET:-}}"
Expand Down
Loading