How to get the api key when running supabase in docker (local)

I'm following the guides (https://supabase.com/docs/guides/cli/local-development) and I have setup my local supabase instance for development using docker. I have a sveltekit app that sets up the private variables, it works when I set them to my remote staging supabase instance, but I can't figure out how to point my application to my local instance. On the local install, there is no page for API Settings to get the anon and service_role key and I can't figure out how to configure this (Sorry for the noob question, I probably missed something obvious, this is my first solo app)
No description
4 Replies
garyaustin
garyaustin3y ago
Trixrabbit
TrixrabbitOP3y ago
Thanks, do you know where I can find the volumes/api/kong.yml I did not clone the docker image and ran everything manually like your link mentions. I used the supabase init and then I start my container with supabase start
garyaustin
garyaustin3y ago
I do not, I've never used local version.
Trixrabbit
TrixrabbitOP3y ago
Alright thanks, it was very simple to use the cli, but I guess I might have to do the manual setup for local dev instead I finally figured it out. The anon and service_role are exposed whenever you start supabase using the CLI. The thing is that my supabase was automatically started on boot, so I would never see them, so the solution was simply to:
supabase stop
supabase start
supabase stop
supabase start
Started supabase local development setup.
URL: http://localhost:54321
URL: postgresql://postgres:postgres@localhost:54322/postgres
Studio URL: http://localhost:54323
Inbucket URL: http://localhost:54324
JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
anon key: abcdefgciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
service_role key: abcdefgciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Started supabase local development setup.
URL: http://localhost:54321
URL: postgresql://postgres:postgres@localhost:54322/postgres
Studio URL: http://localhost:54323
Inbucket URL: http://localhost:54324
JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
anon key: abcdefgciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
service_role key: abcdefgciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Did you find this page helpful?