Supabase Local Development: Default Values and API Usage

When you run `supabase start`, Supabase launches a local backend with fixed values. These defaults make it easy to connect without extra setup.

Default Configuration

When you run supabase start, Supabase launches a local backend with fixed values. These defaults make it easy to connect without extra setup.

ConstantValue
API URLhttp://localhost:54321
REST APIhttp://localhost:54321/rest/v1
Auth APIhttp://localhost:54321/auth/v1
Storage APIhttp://localhost:54321/storage/v1
DB URLpostgres://postgres:postgres@localhost:54322/postgres
DB Hostlocalhost
DB Port54322
DB Userpostgres
DB Passwordpostgres
DB Namepostgres
JWT Secretsuper-secret-jwt-token-with-at-least-32-characters-long
Anon KeyStatic JWT signed with the secret, role = anon
Service Role KeyStatic JWT signed with the secret, role = service_role

API Usage Examples

API URL

Base entry point for all Supabase services.

curl http://localhost:54321

REST API

Exposes database tables as REST endpoints.

curl -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
http://localhost:54321/rest/v1/my_table

Auth API

Handles signup, login, and session management.

curl -X POST http://localhost:54321/auth/v1/signup \
-H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password"}'

Storage API

Manages buckets and files.

curl -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
http://localhost:54321/storage/v1/bucket

Database URL and Credentials

Direct connection string for Postgres.

psql "postgres://postgres:postgres@localhost:54322/postgres"

Authentication Keys

JWT Secret

Used to sign and verify JWTs. The anon and service role keys are derived from this secret.

Anon Key

Static JWT with role anon. Include in headers for client-side requests.

curl -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
http://localhost:54321/rest/v1/my_table

Service Role Key

Static JWT with role service_role. Use in server-side scripts for full access.

curl -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
http://localhost:54321/rest/v1/my_table

Why It Matters

These defaults are always the same in local development, so you can rely on them for quick setup and testing across any stack.