0
0
Supabasecloud~5 mins

Why production needs careful configuration in Supabase

Choose your learning style9 modes available
Introduction

Production is where real users use your app. Careful setup keeps it safe, fast, and reliable.

When launching a new app for customers
When updating your app with new features
When handling sensitive user data like passwords or payments
When you want to avoid downtime or errors in your live app
When scaling your app to many users
Syntax
Supabase
supabase link --project-ref <project-ref>
# or
supabase db push

Use --project-ref to link to your production project.

Production config is managed in the Supabase dashboard with stricter security and performance settings.

Examples
Links your local Supabase CLI project to a remote production project on Supabase Cloud.
Supabase
supabase link --project-ref prj_1234567890abcdef
Deploys database schema changes to your production Supabase project.
Supabase
supabase db push
Sample Program

This JSON shows example production configuration values for a Supabase project (set via dashboard or self-hosting env). It uses a secure database connection, API rate limits, and enables email verification.

Supabase
{
  "db": {
    "connectionString": "postgresql://user:securepassword@db.supabase.co:5432/prod_db",
    "ssl": true
  },
  "api": {
    "rateLimit": 1000,
    "enableCors": true
  },
  "auth": {
    "jwtSecret": "supersecretkey",
    "emailVerification": true
  }
}
OutputSuccess
Important Notes

Always use strong passwords and secrets in production.

Enable SSL to encrypt data between your app and database.

Set API rate limits to protect from too many requests.

Summary

Production needs careful setup to keep your app safe and reliable.

Use secure connections, secrets, and limits in production configs.

Test your production settings before going live.