Encryption Overview
Supabase implements a comprehensive encryption strategy:At Rest
All data stored on disk is encrypted with AES-256
In Transit
All connections use TLS 1.2+ encryption
Backups
Database backups are encrypted before storage
Automatic
No configuration needed, always enabled
Encryption at Rest
Database Storage
All data stored in your Postgres database is encrypted at rest using:- Algorithm: AES-256 encryption
- Scope: All database files, indexes, and WAL files
- Key Management: Managed by cloud provider infrastructure
- Performance: Transparent encryption with minimal overhead
Encryption at rest is provided by the underlying cloud infrastructure and is always enabled. You cannot disable it.
What is Encrypted
The following are encrypted at rest:- Database tables: All user data in tables
- Indexes: All database indexes
- Write-Ahead Logs (WAL): Transaction logs
- Backups: Daily backups and PITR snapshots
- Storage objects: Files uploaded to Supabase Storage
- Temporary files: Any temporary database files
Storage Encryption
Files uploaded to Supabase Storage are also encrypted:Encryption in Transit
All network communication is encrypted using TLS (Transport Layer Security).HTTPS for APIs
All HTTP APIs use TLS 1.2 or higher:- PostgREST (REST API):
https://your-project.supabase.co/rest/v1 - GoTrue (Auth):
https://your-project.supabase.co/auth/v1 - Realtime:
wss://your-project.supabase.co/realtime/v1(WSS = WebSocket Secure) - Storage:
https://your-project.supabase.co/storage/v1
HTTPS is enforced on all API endpoints. HTTP requests are automatically redirected to HTTPS.
PostgreSQL Connections
Database connections support SSL/TLS encryption:SSL Modes
PostgreSQL supports multiple SSL modes:| Mode | Description | Protection |
|---|---|---|
disable | No SSL | None (not recommended) |
allow | Try SSL, fallback to unencrypted | Opportunistic |
prefer | Prefer SSL, fallback to unencrypted | Opportunistic (default) |
require | Require SSL, but don’t verify cert | Prevents eavesdropping |
verify-ca | Require SSL, verify CA | Prevents MITM attacks |
verify-full | Require SSL, verify CA and hostname | Strongest protection |
Using verify-full Mode
Download the CA certificate
Get your CA certificate from the Dashboard:
- Go to Database → Settings
- Scroll to SSL Configuration
- Download Certificate Authority (CA) certificate
SSL Enforcement
Enforce SSL for all database connections:Enable SSL Enforcement
- Dashboard
- CLI
- API
- Go to Database → Settings
- Find SSL Configuration
- Enable Enforce SSL on incoming connections
- Click Confirm
Check SSL Status
Verify SSL enforcement is enabled:Client Library Encryption
JavaScript/TypeScript
The Supabase client automatically uses HTTPS:Python
Flutter/Dart
Application-Level Encryption
For additional security, implement application-level encryption for sensitive fields:Example: Encrypting Sensitive Data
Key Management
Platform Encryption Keys
Supabase manages encryption keys for:- At-rest encryption: Cloud provider managed keys
- TLS certificates: Automatically renewed
- JWT secrets: Rotatable via Dashboard
Platform encryption keys are managed by Supabase and the underlying cloud infrastructure. You cannot access or rotate these keys.
Application Keys
Manage your API keys securely:Rotate if compromised
If keys are exposed:
- Go to Settings → API
- Click Generate new key
- Update applications
- Revoke old key
Compliance
Supabase encryption meets compliance requirements:Certifications
- SOC 2 Type II: Audited encryption controls
- GDPR: EU data protection requirements
- HIPAA: Healthcare data (Enterprise plan)
- ISO 27001: Information security standards
Data Residency
Choose your database region for data residency:- US East: Virginia
- US West: Oregon
- EU West: Ireland
- EU Central: Frankfurt
- AP Southeast: Singapore
- AP Northeast: Tokyo
- AP South: Mumbai
All data, including backups, remains in your selected region.
Best Practices
Troubleshooting
SSL connection failed
SSL connection failed
Error:
SSL connection has been closed unexpectedlySolution:- Verify SSL is supported by your client
- Check SSL mode: try
sslmode=require - Ensure firewall allows SSL connections
- Download and use CA certificate for verify-full
Certificate verification failed
Certificate verification failed
Error:
certificate verify failedSolution:- Download latest CA certificate from Dashboard
- Ensure certificate is in correct location (
~/.postgresql/root.crt) - Check certificate hasn’t expired
- Verify hostname matches certificate
Client doesn't support SSL
Client doesn't support SSL
Error:
SSL is not supportedSolution:- Update client library to latest version
- Check if SSL/TLS is compiled in client
- Use
sslmode=preferto allow fallback (not recommended for production)
Encryption Checklist
Before going to production:Next Steps
Network Security
Configure IP restrictions and network rules
Row Level Security
Implement granular data access control
Production Checklist
Complete pre-launch security review
Compliance
Learn about compliance certifications
