Expose Queues for local and self-hosted Supabase
Learn how to expose Queues when running Supabase with Supabase CLI or Docker Compose
A guide from Supabase
Apps on Plentiful run on Supabase's open-source database, sign-in, file storage and live updates, so most of this guide applies. The differences: your app reaches its database through its own server — not Supabase's data API (supabase.from(…)) — there are no Edge Functions (your app's server does that work), and scheduled work uses Jobs. Where it says "Supabase dashboard", use your app's Dashboard. Ask the builder when in doubt.
By default, local and self-hosted Supabase instances expose only core schemas like public and graphql_public.
To allow client-side consumers to use your queues, you have to add pgmq_public schema to the list of exposed schemas.
Before continuing, complete the step Expose queues to client-side consumers from the Queues Quickstart guide. This creates the pgmq_public schema, which must exist before it can be exposed through the API.
You only need to expose the pgmq_public schema manually when running Supabase locally with the Supabase CLI or self-hosting using Docker Compose.
Expose Queues with Supabase CLI#
When running Supabase locally with Supabase CLI, update your project's config.toml file.
Locate the [api] section and add pgmq_public to the list of schemas.
1[api]2enabled = true3port = 543214schemas = ["public", "graphql_public", "pgmq_public"]Then restart your local Supabase stack.
1supabase stop && supabase startExpose queues with Docker compose#
When running Supabase with Docker Compose, locate the PGRST_DB_SCHEMAS variable inside your .env file and add pgmq_public to it. This environment variable is passed to the rest service inside docker-compose.yml.
1PGRST_DB_SCHEMAS=public,graphql_public,pgmq_publicRestart your containers for the changes to take effect.
1docker compose down2docker compose up -dStop exposing queues#
If you no longer want to expose the pgmq_public schema, you can remove it from your configuration.
- For Supabase CLI, remove
pgmq_publicfrom the[api]schemas list in yourconfig.tomlfile. - For Docker Compose, remove
pgmq_publicfrom thePGRST_DB_SCHEMASvariable in your.envfile.
After updating your configuration, restart your containers for the changes to take effect.