mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## What Adds internal cross-links to docs guides ## Testing - Prettier passes on the changed lines. - Docs build passes (`pnpm build --filter=docs`). - Docs link e2e run locally against the production build for every changed page across this PR --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
98 lines
11 KiB
Plaintext
98 lines
11 KiB
Plaintext
---
|
|
id: 'going-into-prod'
|
|
title: 'Production Checklist'
|
|
description: 'Things to do before making your app publicly available'
|
|
---
|
|
|
|
After developing your project and deciding it's production ready, you should run through this checklist to ensure that your project:
|
|
|
|
- [Is secure](#security)
|
|
- [Won't falter under the expected load](#performance)
|
|
- [Remains available whilst in production](#availability)
|
|
|
|
## Security
|
|
|
|
The security checklist covers [Row Level Security](/docs/guides/database/postgres/row-level-security), SSL and network restrictions, account and organization access, Auth settings, and threat review. For the full list, see [Production security checklist](/docs/guides/security/production-checklist).
|
|
|
|
## Performance
|
|
|
|
<Admonition type="note">
|
|
|
|
Check and review issues in your database using [Performance Advisor](/dashboard/project/_/database/performance-advisor).
|
|
|
|
</Admonition>
|
|
|
|
- Ensure that you have suitable indices to cater to your common query patterns
|
|
- [Learn more about indexes in Postgres](https://www.enterprisedb.com/postgres-tutorials/overview-postgresql-indexes).
|
|
- `pg_stat_statements` can help you [identify hot or slow queries](https://www.virtual-dba.com/blog/postgresql-performance-identifying-hot-and-slow-queries/).
|
|
- Perform load testing (preferably on a staging env)
|
|
- Tools like [k6](https://k6.io/) can simulate traffic from many different users.
|
|
- Upgrade your database if you require more resources. If you need anything beyond what is listed in [the compute and disk table](/docs/guides/platform/compute-and-disk), contact [enterprise@supabase.io](mailto:enterprise@supabase.io).
|
|
- If you are expecting a surge in traffic (for a big launch) and are on a Team or Enterprise Plan, [contact support](/dashboard/support/new) with more details about your launch and we'll help keep an eye on your project.
|
|
- If you expect your [database size](/docs/guides/platform/database-size) to be > 4 GB, enable the Point in Time Recovery (PITR) add-on in the [**Settings > Add-ons**](/dashboard/project/_/settings/addons?panel=pitr) section of the dashboard.
|
|
|
|
## Availability
|
|
|
|
- Use your own SMTP credentials so that you have full control over the deliverability of your transactional auth emails in the [**Authentication > Emails > SMTP Settings**](/dashboard/project/_/auth/smtp) section of the dashboard.
|
|
- You can grab SMTP credentials from any major email provider such as SendGrid, AWS SES, etc. Read our [SMTP guide](/docs/guides/auth/auth-smtp) for more setup details.
|
|
- The default rate limit for auth emails when using a custom SMTP provider is _30 new users per hour_. If you are doing a major public announcement, you will likely require more than this.
|
|
- We may pause applications on the Free Plan that exhibit low activity in a 7-day period to save on server resources.
|
|
- You can restore paused projects from [the Supabase dashboard](/dashboard/project/_).
|
|
- Upgrade to Pro to guarantee that we won't pause your project for inactivity.
|
|
- Database backups are not available for download for Free Plan projects.
|
|
- Read [the Database Backups guide](/docs/guides/platform/backups) for more options and retention details.
|
|
- If you need a lower recovery point objective (RPO), enable Point-in-Time Recovery (PITR). PITR allows you to back up a project at shorter intervals. This provides users an option to restore to any chosen point in time with second-level granularity.
|
|
- Supabase Projects use disks that offer 99.8-99.9% durability by default.
|
|
- Use [Read Replicas](/docs/guides/platform/read-replicas) if you require availability resilience to a disk failure event
|
|
- Use PITR if you require durability resilience to a disk failure event
|
|
- Upgrading to the Supabase Pro Plan gives you [access to our support team](/dashboard/support/new).
|
|
|
|
## Deployment
|
|
|
|
- Connect your GitHub repository and enable **Deploy to production** in the integration settings to automate deployments from your `main` branch ([set up the integration](/dashboard/project/_/settings/integrations))
|
|
- This ensures schema changes are deployed consistently and avoids manual `supabase db push --remote` from a local machine
|
|
- If you're on the Pro Plan, consider enabling [branching](/docs/guides/deployment/branching) to test migrations in a preview environment before they reach production
|
|
|
|
## Rate limiting, resource allocation, & abuse prevention
|
|
|
|
<Admonition type="caution" title="Shared Responsibility Model">
|
|
|
|
Running databases is a shared responsibility between you and Supabase. There are some things that we can take care of for you, and some things that you are responsible for.
|
|
|
|
Read more details in our [Shared Responsibility Model guide](/docs/guides/deployment/shared-responsibility-model).
|
|
|
|
</Admonition>
|
|
|
|
- Supabase employs a number of safeguards against bursts of incoming traffic to prevent abuse and help maximize stability across the platform
|
|
- If you're on a Team or Enterprise Plan and expect high load events, such as production launches, heavy load testing, or prolonged high resource usage, open a ticket via the [support form](https://supabase.help) for help. Provide at least 2 weeks notice.
|
|
|
|
### Auth rate limits
|
|
|
|
- The table below shows the rate limit quotas on the following authentication endpoints. You can configure the authentication rate limits for your project in the [**Authentication > Rate Limits**](/dashboard/project/_/auth/rate-limits) section of the dashboard.
|
|
|
|
| Endpoint | Path | Limited By | Rate Limit |
|
|
| ------------------------------------------------ | -------------------------------------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| All endpoints that send emails | `/auth/v1/signup` `/auth/v1/recover` `/auth/v1/user`[^1] | Sum of combined requests | As of 3 Sep 2024, this has been updated to <SharedData data="config">auth.rate_limits.email.inbuilt_smtp_per_hour.value</SharedData> emails per hour. You can only change this with your own [custom SMTP setup](/docs/guides/auth/auth-smtp). |
|
|
| All endpoints that send One-Time-Passwords (OTP) | `/auth/v1/otp` | Sum of combined requests | Defaults to 360 OTPs per hour. Is customizable. |
|
|
| Send OTPs or magic links | `/auth/v1/otp` | Last request | Defaults to 60 seconds window before a new request is allowed. Is customizable. |
|
|
| Signup confirmation request | `/auth/v1/signup` | Last request | Defaults to 60 seconds window before a new request is allowed. Is customizable. |
|
|
| Password Reset Request | `/auth/v1/recover` | Last request | Defaults to 60 seconds window before a new request is allowed. Is customizable. |
|
|
| Verification requests | `/auth/v1/verify` | IP Address | 360 requests per hour (with bursts up to 30 requests) |
|
|
| Token refresh requests | `/auth/v1/token` | IP Address | 1800 requests per hour (with bursts up to 30 requests) |
|
|
| Create or Verify an MFA challenge | `/auth/v1/factors/:id/challenge` `/auth/v1/factors/:id/verify` | IP Address | 15 requests per minute (with bursts up to 30 requests) |
|
|
| Anonymous sign-ins | `/auth/v1/signup`[^2] | IP Address | 30 requests per hour (with bursts up to 30 requests) |
|
|
|
|
### Realtime limits
|
|
|
|
- Review the [Realtime limits](/docs/guides/realtime/limits).
|
|
- If you need limits increased, [contact support](/dashboard/support/new).
|
|
|
|
### Abuse prevention
|
|
|
|
- Supabase provides CAPTCHA protection on the signup, sign-in and password reset endpoints. Read [the Auth CAPTCHA guide](/docs/guides/auth/auth-captcha) for more details on how to protect against abuse using this method.
|
|
|
|
### Email link validity
|
|
|
|
- When working with enterprise systems, email scanners may scan and make a `GET` request to the reset password link or sign-up link in your email. Since links in Supabase Auth are single-use, a user who opens an email post-scan to click on a link will receive an error. To get around this problem, consider altering the email template to replace the original magic link with a link to a domain you control. The domain can present the user with a "Sign-in" button, which redirects the user to the original magic link URL when clicked.
|
|
- When using a custom SMTP service, some services might have link tracking enabled which may overwrite or deform the email confirmation links sent by [Supabase Auth](/docs/guides/auth). To prevent this from happening, we recommend that you disable link tracking when using a custom SMTP service.
|