Local development & CLI
Local secrets and environment variables can be loaded in either of the following two ways
- Through an
.envfile placed atsupabase/functions/.env, which is automatically loaded onsupabase start - Through the
--env-fileoption forsupabase functions serve, for example:supabase functions serve --env-file ./path/to/.env-file
Self-Hosted Supabase
Change settings in.env fileanddocker-compose.ymlatfunctionsservice
Secrets can also be loaded at runtime by injecting them intomain/index.ts file