-
-
Notifications
You must be signed in to change notification settings - Fork 271
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
Self-hosting Supabase storage didn't work for me straightaway, seemingly because of a missing Postgres permission on the database for the supabase_storage_admin user.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Try to start the Supabase self-hosted Docker Compose setup.
- Check the logs of the supabase-storage container. It should display this error:
permission denied for database <NAME>. - Run this command in the Postgres DB:
GRANT CREATE ON DATABASE :"db_name" TO supabase_storage_admin; - Restart the containers (preferably after running the reset script), and the error should be gone.
I have my own repo with the Supabase setup here (though I disabled PostgREST, Realtime and Auth). Also, I'm assuming that there wasn't a Supabase update in the last 2-3 months that resolves this issue anyways. The only container I explicitly updated to the latest version is the storage container.
Expected behavior
The storage container should be able to run without the CREATE privilege on the database, as that violates the principle of least privilege.
System information
- OS: Linux
- Version of Node.js: v24.11.1
Additional context
As a side note, I don't think the storage container should depend on the REST container. I just commented out the dependency and it ran just fine, so I don't get why it's set up that way to begin with. I think it should be easy for developers to pick which services they want to use.