Skip to content

fix(deploy): Fly.io requires POWDB_BIND=[::] (IPv6), not 0.0.0.0#88

Merged
zvndev merged 1 commit into
mainfrom
fix/fly-bind-ipv6
Jun 10, 2026
Merged

fix(deploy): Fly.io requires POWDB_BIND=[::] (IPv6), not 0.0.0.0#88
zvndev merged 1 commit into
mainfrom
fix/fly-bind-ipv6

Conversation

@zvndev

@zvndev zvndev commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Problem

The example fly.toml set POWDB_BIND = "0.0.0.0", so the documented fly proxy access path silently failed: the proxy connects locally but the forwarded TCP stream resets, and clients see handshake read error: Connection reset by peer / handshake failed.

Root cause: Fly's private .internal network and fly proxy route 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 does format!("{bind}:{port}"), so [::][::]:5433 and accepts both stacks.
  • README.md: env-var table now calls out the Fly [::] exception vs IPv4 platforms.
  • Railway / Docker / ECS examples are IPv4 and correctly keep 0.0.0.0 (unchanged).

Verification (live)

Redeployed powdb-example (iad, ghcr.io/zvn-dev/powdb:v0.4.7) with POWDB_BIND=[::]. From the laptop via fly proxy 5433:5433:

  • type … { required unique … } → created
  • duplicate insert → unique constraint violation on FlyAcct2.email returned over the wire

Before 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

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>
@zvndev zvndev merged commit 23707c7 into main Jun 10, 2026
7 checks passed
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