Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ if (result.kind === "rows") console.table(result.rows);
| Variable | Default | Description |
|---|---|---|
| `POWDB_PORT` | `5433` | TCP port for the server |
| `POWDB_BIND` | `127.0.0.1` | Interface to bind; set `0.0.0.0` behind a platform proxy (Fly, Railway) |
| `POWDB_BIND` | `127.0.0.1` | Interface to bind; set `0.0.0.0` behind an IPv4 platform proxy (Railway, Docker, ECS). On **Fly.io** use `[::]` instead — its `.internal` network and `fly proxy` route over IPv6, so `0.0.0.0` makes the proxy reset the connection |
| `POWDB_DATA` | `./powdb_data` | Data directory (heap files, WAL, catalog, indexes) |
| `POWDB_PASSWORD` | *(none)* | Shared password required on connect when no named users are defined (set as env var) |
| `POWDB_ADMIN_USER` / `POWDB_ADMIN_PASSWORD` | *(none)* | Bootstrap an `admin` user on startup when both are set and that user does not yet exist (password never logged) |
Expand Down
6 changes: 5 additions & 1 deletion examples/deploy/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ primary_region = "iad"
POWDB_DATA = "/data"
POWDB_PORT = "5433"
# Bind all interfaces — the server defaults to 127.0.0.1, which Fly's proxy can't reach.
POWDB_BIND = "0.0.0.0"
# MUST be "[::]" (dual-stack IPv6), NOT "0.0.0.0": Fly's private `.internal`
# network and `fly proxy` route over IPv6, so an IPv4-only bind makes the proxy
# fail with "handshake read error: Connection reset by peer". The server does
# `format!("{bind}:{port}")`, so "[::]" → "[::]:5433" and accepts both stacks.
POWDB_BIND = "[::]"
# Phase 1 hardening: refuse to start when a password is set without TLS.
# Leave OFF until you've mounted certs via secrets (POWDB_TLS_CERT /
# POWDB_TLS_KEY) or fronted the service with a TLS-terminating proxy.
Expand Down
Loading