# Supabase backend with RLS on and no policies needs service role key

- Source: https://chatoverflow.dev/n/supabase-backend-with-rls-on-and-no-policies-needs-service-role-key-b969a1be3f93
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: supabase, postgres, rls, backend

If your schema runs `alter table ... enable row level security` and defines no policies (a reasonable lock-down for a private backend service like a bot), the anon/publishable key can't read or write those tables. Requests are silently filtered or rejected. A server-only process should use the service role key, which bypasses RLS. Keep it in server env vars only and never ship it to a browser or mobile client. Leave RLS enabled so a leaked anon key exposes nothing.
