diff --git a/docs/api/_DATABASE_USE_IPV6.md b/docs/api/_DATABASE_USE_IPV6.md index 61652eac6f..1e4a9cf9e8 100644 --- a/docs/api/_DATABASE_USE_IPV6.md +++ b/docs/api/_DATABASE_USE_IPV6.md @@ -1 +1 @@ -Set to `false` to stop Electric from trying to connect to the database over IPv6. By default, it will try to resolve the hostname from `DATABASE_URL` to an IPv6 address, falling back to IPv4 in case that fails. +Set to `true` to prioritise connecting to the database over IPv6. Electric will fall back to an IPv4 DNS lookup if the IPv6 lookup fails. diff --git a/docs/api/service.md b/docs/api/service.md index 32faf19942..c871c84f04 100644 --- a/docs/api/service.md +++ b/docs/api/service.md @@ -82,8 +82,8 @@ Configure how Electric connects to Postgres and exposes its HTTP/WebSocket API. + defaultValue="false" + example="true"> diff --git a/docs/deployment/fly.md b/docs/deployment/fly.md index 2f2112a3bb..82421502cf 100644 --- a/docs/deployment/fly.md +++ b/docs/deployment/fly.md @@ -164,12 +164,13 @@ Restarting machine 148ed127a03de8 Waiting for 148ed127a03de8 to become healthy (started, 1/3) ``` -Now go back to [Configure your Fly app](#configure-your-fly-app) above and modify the contents of the `fly.toml` file shown there by changing the `DATABASE_URL` value to use your Fly Postgres instance's connection string and adding the `DATABASE_REQUIRE_SSL` environment variable: +Now go back to [Configure your Fly app](#configure-your-fly-app) above and modify the contents of the `fly.toml` file shown there by changing the `DATABASE_URL` value to use your Fly Postgres instance's connection string and adding `DATABASE_USE_IPV6` and `DATABASE_REQUIRE_SSL` environment variables: ```toml [env] DATABASE_URL = "postgres://postgres:...@.flycast:5432" + DATABASE_USE_IPV6 = "true" DATABASE_REQUIRE_SSL = "false" ...the rest of the env vars ``` diff --git a/docs/deployment/supabase.md b/docs/deployment/supabase.md index 97b8248bdb..d0a3a4f2e7 100644 --- a/docs/deployment/supabase.md +++ b/docs/deployment/supabase.md @@ -83,6 +83,7 @@ Run your [Electric sync service](../api/service), either locally or [via one of - set `AUTH_JWT_ALG` to `HS256` to enable secure auth mode with the right signing algorithm - set `AUTH_JWT_KEY` to the "JWT Secret" value you retrieved in step 3 above - set `DATABASE_URL` to the connection string you retrieved in step 2 above +- set `DATABASE_USE_IPV6` to `true` unless you've purchased the IPv4 add-on for Supabase - set `ELECTRIC_WRITE_TO_PG_MODE` to `direct_writes` - set `PG_PROXY_PASSWORD` to a secure password value and note it down @@ -93,6 +94,7 @@ docker run \ -e "AUTH_JWT_ALG=HS256" \ -e "AUTH_JWT_KEY=..." \ -e "DATABASE_URL=..." \ + -e "DATABASE_USE_IPV6=true" \ -e "ELECTRIC_WRITE_TO_PG_MODE=direct_writes" \ -e "PG_PROXY_PASSWORD=..." \ -e "PG_PROXY_PORT=65432" \