You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CloudSync server needs to connect to your PostgreSQL database. Since both the CloudSync server and the Supabase VM are in the same Fly org, they can communicate over Fly's **private internal network** using `.internal` addresses — no public port exposure needed.
605
+
The CloudSync server needs a PostgreSQL connection string to reach your database. There are two options depending on where your CloudSync server runs:
583
606
584
-
The connection goes through **Supavisor** (Supabase's connection pooler) in session mode. The username format is `postgres.<POOLER_TENANT_ID>` (check your `.env` for `POOLER_TENANT_ID`).
607
+
**Option A: CloudSync on the same Fly org (`.internal` network)**
608
+
609
+
If both the CloudSync server and the Supabase VM are in the same Fly org, they can communicate over Fly's **private internal network** — no public port exposure needed. Connect directly to the `db` container's mapped port (5432 is exposed on the host by default in docker-compose):
> **Note:** Inside Docker, use the container name `supabase-pooler` instead of the `.internal` address. The `.internal` address is for Fly-to-Fly communication.
631
+
> **Note:** The proxy must stay running in a separate terminal for the duration of your session. If the proxy disconnects, just re-run the command.
632
+
633
+
To verify the connection works:
634
+
635
+
```bash
636
+
# Option A: SSH into the VM and test locally
637
+
fly ssh console --app <your-fly-app-name>
638
+
docker compose exec db psql -U postgres -c "SELECT 1;"
639
+
640
+
# Option B: With fly proxy running, test from your local machine
> **Tip:** You can proxy multiple ports at once by running multiple `fly proxy` commands in separate terminals (e.g., `8000` for Studio and `5432` for Postgres).
0 commit comments