© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
6 replies
aith

Anon and Service key for Supabase local

I am running supabase locally but having a bit of trouble understanding how I can connect it to remove vs production. So, I have a
.env.local
.env.local
. And a
client.ts
client.ts
which creates a supabase instance like this:
export const supabase = createClient<Database>(
    SUPABASE_URL,
    SUPABASE_ANON_KEY,
    {
        auth: {
            storage: customStorage,
            persistSession: true,
            autoRefreshToken: true
        }
    }
);
export const supabase = createClient<Database>(
    SUPABASE_URL,
    SUPABASE_ANON_KEY,
    {
        auth: {
            storage: customStorage,
            persistSession: true,
            autoRefreshToken: true
        }
    }
);

How do I check what the
ANON_KEY
ANON_KEY
,
service_role
service_role
and
PUBLISHABLE_KEY
PUBLISHABLE_KEY
are for my local development?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Supabase gave me the same key for public anon and service account
SupabaseSSupabase / help-and-questions
12mo ago
using the service role key but supabase thinks im anon
SupabaseSSupabase / help-and-questions
13mo ago
API KEY "ANON_KEY " for REPLIT
SupabaseSSupabase / help-and-questions
2mo ago
Supabase Local - API Key?
SupabaseSSupabase / help-and-questions
3y ago