Skip to content

feat(docker): remove superuser access#1592

Draft
everettbu wants to merge 8 commits into
masterfrom
feat/postgres-role
Draft

feat(docker): remove superuser access#1592
everettbu wants to merge 8 commits into
masterfrom
feat/postgres-role

Conversation

@everettbu

@everettbu everettbu commented Feb 18, 2026

Copy link
Copy Markdown

Mirror of supabase/supabase#42975
Original author: singh-inder


I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

feature, docs

  • add script to reassign public schema objects to postgres user
  • add doc to remove superuser access from studio

What is the current behavior?

closes #36973, closes #40676

@everettbu everettbu added the documentation Improvements or additions to documentation label Feb 18, 2026

- Objects created via the dashboard may still be owned by `supabase_admin`
- Behavior differs from hosted Supabase
- Some migrations may fail when run as postgres

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [rdjsonl] reported by reviewdog 🐶
[Rule003Spelling] Word not found in dictionary: postgres (configure rule at supa-mdx-lint/Rule003Spelling.toml)

Suggested change
- Some migrations may fail when run as postgres
- Some migrations may fail when run as Postgres

### Step 2: Update environment variables in docker-compose.yml

- Open your docker-compose.yml file and locate the `studio` service environment variables.
Uncomment the following line so studio uses `postgres` role for read/write access:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [rdjsonl] reported by reviewdog 🐶
[Rule003Spelling] Word not found in dictionary: Uncomment (configure rule at supa-mdx-lint/Rule003Spelling.toml)


## Verify the configuration

After restarting your services, verify that Supabase Studio is now using the postgres role. Run the following query in the Supabase Studio SQL Editor:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [rdjsonl] reported by reviewdog 🐶
[Rule003Spelling] Word not found in dictionary: postgres (configure rule at supa-mdx-lint/Rule003Spelling.toml)

Suggested change
After restarting your services, verify that Supabase Studio is now using the postgres role. Run the following query in the Supabase Studio SQL Editor:
After restarting your services, verify that Supabase Studio is now using the Postgres role. Run the following query in the Supabase Studio SQL Editor:

@everettbu everettbu added database self-hosted Related to self-hosted Supabase labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database documentation Improvements or additions to documentation self-hosted Related to self-hosted Supabase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants