Skip to main content

Prerequisites

Install the required tooling:
You also need Docker Desktop, which Supabase local development requires.

Setup

Local development

Environment variables

Edge Functions automatically load environment variables from .env.local:
Get the keys from supabase status:

Local services

Project structure

Troubleshooting

  • Ensure Docker is running
  • Check ports: lsof -i :54321,54322,54323
  • Reset: supabase stop && supabase start
  • Check logs: supabase functions serve --debug
  • Verify env vars: cat .env.local
  • Reset: supabase db reset
  • Connect directly: psql postgresql://postgres:postgres@localhost:54322/postgres

Resources