-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fresh self-hosted Docker instance fails due to database users' passwords not being set #18836
Comments
Hello, I've had same issue, take a look at solutions proposed there: supabase/issues/11957 |
Yeah, I combed through some past issues and tried a few different proposed solutions before submitting this one:
Installing the CLI and running
|
Update: I was able to get the auth and rest containers running successfully by doing the following:
However, supabase-realtime and supabase-analytics are still failing. The logs from the realtime container showed a problem with the password for supabase_admin:
So I went back into the db container and ran
As well as the analytics container:
I'm not a Postgres expert by any means so while I'm sure these issues are all related to the database initialization/migration scripts, I'm not sure what else I need to do to correct these issues. |
To enable the analytics container you need to enable it in config.toml
Doc Link - https://supabase.com/docs/guides/cli/config#analytics-config |
If that's the case, shouldn't that be noted in the Docker guide? |
Did my answer work? I answer it in the context of Local development. |
Hello, I have the same problem as @krysialynne. Is there any solution? I've added the:
but that didn't solve my problem. ***Reinstaling everything solved the problem |
Hey, I am glad that after hours of trying things to make the setup work I find the problem here, so it’s not my incompetence. I am facing the exact same problem. Any updates so far? |
No, this issue is in the context of the self-hosted setup instructions. |
I met the same issue. Just solve it by:
IPv4 external connectionshost all all 10.0.0.0/8 scram-sha-256
IPv4 external connectionshost all all 10.0.0.0/8 scram-sha-256 I hope it's helpful. |
I will close this one as it is resolved with better self-hosting instructions for analytics Please comment if you are still experiencing issues or want to see more improvements |
I'm running through the Self-Hosting w/Docker instructions and hitting the same issue. After changing the the default
I can then run
Docker version 25.0.2, build 29cf629 |
Did this ever get resolved. Having the same issue as @timzl |
Yep, see the closing comment. If you have changed the password, ensure there are no special chars (or it is encoded properly) and that each container is picking up the change |
Hi all, i want to test supabase on my own ubuntu VM. i just follow the instruction here https://supabase.com/docs/guides/self-hosting/docker. Without changing anything, i follow these steps. These are the container status: This is the supabase-analytics logs : I suspect it crashed in supabase-analytics which contribute to the storage-api, realtime-dev.supabase-realtime, supabase-rest, supabase-kong keep restarting. May i know what should i do to solve this issue? I had try to resolve by: I also try to exec it into supabase-db: But the problem stil presists. My situation is difference from the other post is that i did not change any credential, i followed the official guide to fresh install. |
@joewin319 Same issue here, and I did not find a proper solution. Sometimes it just worked to restart docker with But the safer approach is to reset the whole database:
Take care especially with the last step to run it on a local db first. |
I have the similar issues when I tried to update the supabase containers. I removed the old data of database since I don't have much data into it, then Maybe a better solution is need to update/migrate the database to fit the new database structure. |
Same issue, backing out changes finally showed me that NOT changing the POSTGRES_PASSWORD allowed everything to start. That said, I would actually like to have a password that was not default. I read through the fix that closed this @encima , but saw no mention of the basic install in docker with the exception that it never told me to change the passwords, even though they are listed in .env.example as "your-super-secret-and-long-postgres-password" |
Seems to be an issue with /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql in the postgres / db image As a workaround: Patch your /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql in your db container by adding |
Bug report
Describe the bug
When running a new self-hosted instance of Supabase with docker compose, the supabase-analytics container fails to start. Examining the docker compose logs for supabase-analytics reveals:
Checking the supabase-db container logs reveals:
If I exec into supabase-db and run
echo $POSTGRES_PASSWORD
, the correct password is printed. This error occurs regardless of whether the default values in .env have been changed.Logging into the postgres shell as user 'postgres' and running \du shows the following users configured on the database:
Note that supabase_functions_admin is not listed here while it is present in roles.sql.
If I manually set the passwords for each user listed in roles.sql and then run
docker compose restart
, the db and analytics containers build correctly but the auth container fails. Logs indicate an error while running the 00_init_auth_schema.up.sql:ERROR: must be owner of function uid
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
git clone --depth 1 https://github.com/supabase/supabase
cd
into supabase/docker and copy environment vars withcp .env.example .env
docker compose pull
docker compose up -d
Expected behavior
supabase-database container should be configured correctly with the accounts listed in roles.sql and password from .env file.
System information
The text was updated successfully, but these errors were encountered: