From d002ebe7e58f2e1913ac6b4833dc45c470640a8e Mon Sep 17 00:00:00 2001 From: "Andrey A." <56412611+aantti@users.noreply.github.com> Date: Wed, 17 Jun 2026 14:43:24 +0200 Subject: [PATCH] fix(self-hosted): use postgres user instead of supabase_admin for studio (#47022) --- docker/CONFIG.md | 4 ++-- docker/docker-compose.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/CONFIG.md b/docker/CONFIG.md index f4bd19eebe1..ae5ed04fd04 100644 --- a/docker/CONFIG.md +++ b/docker/CONFIG.md @@ -90,8 +90,8 @@ The image tags below are pinned in `docker-compose.yml` at the time of this docu | `POSTGRES_HOST` | string | Self-hosted | Postgres host (service name in compose network). | Default: `db`. | | `POSTGRES_PASSWORD` | string | Both | Postgres password for the `POSTGRES_USER_READ_WRITE` role. | Supports `_FILE` suffix for Docker secrets. | | `POSTGRES_PORT` | integer | Self-hosted | Postgres TCP port. | Default: `5432`. | -| `POSTGRES_USER_READ_ONLY` | string | | Postgres role used for read-only queries from the SQL editor. | Default: `supabase_read_only_user`. Only takes effect if you've manually created the role per the "remove superuser access" guide. | -| `POSTGRES_USER_READ_WRITE` | string | Both | Postgres role used for read/write queries from the SQL editor. | Default: `supabase_admin`. Commented out in default compose. See "remove superuser access" guide. | +| `POSTGRES_USER_READ_ONLY` | string | | Postgres role used by the local MCP server when running in read-only mode. | Default: `supabase_read_only_user`. This role has no password by default, so read-only MCP will fail to connect. To enable, assign a password matching `POSTGRES_PASSWORD`. | +| `POSTGRES_USER_READ_WRITE` | string | Both | Postgres role used for read/write queries from the SQL editor. | Default: `postgres`. | | `STUDIO_PG_META_URL` | URL | Both | URL of the `postgres-meta` service used for schema introspection. | E.g. `http://meta:8080`. Required. | | `SUPABASE_PUBLIC_URL` | URL | Both | Public URL of the Supabase stack (Kong gateway) as seen by end users. | Used to construct REST API URLs and connection strings shown in the dashboard. | | `SUPABASE_URL` | URL | Both | Internal URL Studio uses to reach Kong from inside the Docker network. | E.g. `http://kong:8000`. | diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 47c89e8aa7d..33e961257e1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -37,7 +37,7 @@ services: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} # See: https://supabase.com/docs/guides/self-hosting/remove-superuser-access - #POSTGRES_USER_READ_WRITE: postgres + POSTGRES_USER_READ_WRITE: postgres PG_META_CRYPTO_KEY: ${PG_META_CRYPTO_KEY} PGRST_DB_SCHEMAS: ${PGRST_DB_SCHEMAS} @@ -431,7 +431,7 @@ services: PG_META_DB_HOST: ${POSTGRES_HOST} PG_META_DB_PORT: ${POSTGRES_PORT} PG_META_DB_NAME: ${POSTGRES_DB} - PG_META_DB_USER: supabase_admin + PG_META_DB_USER: postgres PG_META_DB_PASSWORD: ${POSTGRES_PASSWORD} CRYPTO_KEY: ${PG_META_CRYPTO_KEY}