Need Assistance: Possible API Misconfiguration

Hello, I’m encountering an error and I can’t change the database password. I’d appreciate some help if possible. I believe the API might not be configured correctly, but I don’t fully understand how to modify it.
No description
No description
56 Replies
inder
inder2w ago
You've tagged self-hosted. Is this on self-hosted instance? I'm confirming because in the past users have incorrectly tagged their posts If it is self-hosted instance, are you running docker-compose version or using supabase cli?
ΣYDRISS
ΣYDRISSOP2w ago
Yes, this is indeed a self-hosted instance.
inder
inder2w ago
?
ΣYDRISS
ΣYDRISSOP2w ago
I’m using the Docker Compose version for this self-hosted instance.
inder
inder2w ago
When self-hosting, you can't make any config changes from supabase dashboard. In this case for updating db password, you will have to manually exec into container and update password. For convenience I've written this script https://github.com/singh-inder/supabase-automated-self-host/blob/main/docker/update-db-pass.sh Place this script in the docker folder, make this executable and it will automatically update db password and restart containers.
ΣYDRISS
ΣYDRISSOP2w ago
here ?*
No description
inder
inder2w ago
yes
ΣYDRISS
ΣYDRISSOP2w ago
ok ^^ I’m using a Cloudflare tunnel in my setup, but it seems like it hasn’t made any difference.
ΣYDRISS
ΣYDRISSOP2w ago
No description
inder
inder2w ago
You won't see any updates on dashboard. The password should be updated in .env file This is also true for any auth config like setting up oauth providers or updating jwt secret. All the config is done via env vars
ΣYDRISS
ΣYDRISSOP2w ago
Do I choose the password myself, or does the script generate one automatically?
inder
inder2w ago
You've the option to enter your own, otherwise it generates one randomly on this line https://github.com/singh-inder/supabase-automated-self-host/blob/main/docker/update-db-pass.sh#L6
ΣYDRISS
ΣYDRISSOP2w ago
No description
No description
No description
inder
inder2w ago
Did you run the script?
ΣYDRISS
ΣYDRISSOP2w ago
yes
ΣYDRISS
ΣYDRISSOP2w ago
No description
inder
inder2w ago
Are you looking at .env.bak file? Its a backup file which was generated before modifying the original env vars are loaded from .env file
ΣYDRISS
ΣYDRISSOP2w ago
I haven’t touched the .env.bak file. okay is good ^^
inder
inder2w ago
Password updated in .env file?
ΣYDRISS
ΣYDRISSOP2w ago
The following items have been updated:
POSTGRES_PASSWORD JWT_SECRET
inder
inder2w ago
script doesn't update JWT_SECRET
ΣYDRISS
ΣYDRISSOP2w ago
Yes, the password has been updated in the .env file, but not DASHBOARD_PASSWORD.
inder
inder2w ago
Script only updates POSTGRES_PASSWORD. Nothing else. DASHBOARD_PASSWORD is the password when logging in supabase dashboard. Not related to db
ΣYDRISS
ΣYDRISSOP2w ago
Since I ran the script, I’ve encountered this issue with JWT_SECRET again.
inder
inder2w ago
Can you share the error msg you get
ΣYDRISS
ΣYDRISSOP2w ago
this ?
No description
inder
inder2w ago
When do you see this message? Is it when you make any config related changes from supabase dashboard?
ΣYDRISS
ΣYDRISSOP2w ago
yes
inder
inder2w ago
You won't be able to make any config related changes from dashboard. So consider this UI not of any use when self-hosting. You can only make SQL queries on self-hosted dashboard
ΣYDRISS
ΣYDRISSOP2w ago
Alright, I understand.
inder
inder2w ago
Even if you try to change auth related setting like adding google auth provider or something else, you'll see the same API Error. You can create buckets, upload files to buckets and run sql queries or DB operations which don't make any config changes. That should work fine
ΣYDRISS
ΣYDRISSOP2w ago
So I can’t do anything via the dashboard? Not even recreate an organization or anything else?
inder
inder2w ago
No, nothing like that. You only have one default organization One project. If you want to setup another project, then you need to setup another supabase stack
ΣYDRISS
ΣYDRISSOP2w ago
I understand. Does this apply even with your setup?
inder
inder2w ago
Yes My script simply builds on top of default
ΣYDRISS
ΣYDRISSOP2w ago
Ah, so that means a lot of installations and multiple ports running simultaneously, which requires several modifications? Is it at least possible to create multiple databases?
inder
inder2w ago
correct. If you want multiple production instances, coolify or dokploy are a better choice. If these are going to be dev projects, then use supabase cli You can but I believe only the default postgres db is exposed via rest api. Direct connection should work In fact, Already 2 db's are created when you setup an instance. the default postgres db and _supabase db
ΣYDRISS
ΣYDRISSOP2w ago
Is it possible to use the database in the same way as, for example, with phpMyAdmin?
inder
inder2w ago
I've connected to db's using adminer. I assume phpMyAdmin is another db client?
ΣYDRISS
ΣYDRISSOP2w ago
Alright, but is it possible to create multiple databases for different projects? yes
inder
inder2w ago
Direct connection will work. Its postgres underneath, what you can do with postgres should work with this. If this isn't a production instance, you can also create different schemas for different projects and place your tables in a different schema That way you can still use supabase client to make rest api queries
ΣYDRISS
ΣYDRISSOP2w ago
Okay. Alright, I understand. So my configuration is correct and working properly, right? And it’s normal to have an API error in this case?
inder
inder2w ago
correct. For config related things this Api Error is expected. The things I mentioned here should work https://discord.com/channels/839993398554656828/1426134986599436349/1426143391283941489
ΣYDRISS
ΣYDRISSOP2w ago
Alright, thank you! I’ll look into it and learn more about it.
inder
inder2w ago
Have you also updated your SUPABASE_PUBLIC_URL env var. users usually miss that step in docs
ΣYDRISS
ΣYDRISSOP2w ago
yes
No description
inder
inder2w ago
It is used by dashboard to figure out url to upload files. If you want multiple instances on same server, then the easier path is use coolify or dokploy. Coolify's supabase template images are more recent than dokploy's
ΣYDRISS
ΣYDRISSOP2w ago
Alright, thanks! I’ll check it out.
ΣYDRISS
ΣYDRISSOP2w ago
I can’t even write SQL queries from the dashboard?
No description
inder
inder2w ago
This should've worked. Can you try with a simple query SELECT current_user;
ΣYDRISS
ΣYDRISSOP2w ago
No description
inder
inder2w ago
I see the results are coming. This is happening because of AI generating snippet title like it does on hosted dashboard
ΣYDRISS
ΣYDRISSOP2w ago
So, when I add my database, it’s supposed to work properly?
inder
inder2w ago
you mean connect to db via some app?
ΣYDRISS
ΣYDRISSOP2w ago
No, I mean creating it via the dashboard (using SQL).
inder
inder2w ago
Yes, the query itself is executing. You didn't show the complete screenshot but I assume query executed there as well like SELECT current_user; If a table was created, it must be present in table editor page docker imgs for self-hosted were updated 2 days back they must have missed this dashboard bug where it continuously tries to connect to AI to generate snippet title If this api error msg when executing sql annoys you, you can use this studio img supabase/studio:2025.08.04-sha-6e99ca6

Did you find this page helpful?