fix(deploy): Fly.io requires POWDB_BIND=[::] (IPv6), not 0.0.0.0#88
Merged
Conversation
Fly's private .internal network and `fly proxy` route over IPv6. With an IPv4-only bind (0.0.0.0) the proxy connects locally but the forwarded stream resets — clients see 'handshake read error: Connection reset by peer'. The example fly.toml shipped 0.0.0.0, so the documented `fly proxy` access path silently failed. Verified live: after redeploying powdb-example with [::], laptop `fly proxy` → unique-constraint insert returns the actionable 'unique constraint violation' over the wire. Railway/Docker/ECS examples are IPv4 and correctly keep 0.0.0.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The example
fly.tomlsetPOWDB_BIND = "0.0.0.0", so the documentedfly proxyaccess path silently failed: the proxy connects locally but the forwarded TCP stream resets, and clients seehandshake read error: Connection reset by peer/handshake failed.Root cause: Fly's private
.internalnetwork andfly proxyroute over IPv6. An IPv4-only bind never accepts the proxied connection.Fix
examples/deploy/fly.toml:POWDB_BIND = "[::]"(dual-stack) with an explanatory comment. The server doesformat!("{bind}:{port}"), so[::]→[::]:5433and accepts both stacks.README.md: env-var table now calls out the Fly[::]exception vs IPv4 platforms.0.0.0.0(unchanged).Verification (live)
Redeployed
powdb-example(iad,ghcr.io/zvn-dev/powdb:v0.4.7) withPOWDB_BIND=[::]. From the laptop viafly proxy 5433:5433:type … { required unique … }→ createdunique constraint violation on FlyAcct2.emailreturned over the wireBefore the fix the same proxy path reset every connection. This matches the long-standing gotcha already documented in our deploy notes; the example config simply hadn't been updated to match.
🤖 Generated with Claude Code