Migrating from Supabase Cloud
Step-by-step guide to migrate your Supabase Cloud project to self-hosted Supascale.
This guide walks you through migrating an existing Supabase Cloud project to your self-hosted Supascale instance.
Migration Options
Supascale offers two ways to migrate from Supabase Cloud:
| Method | Best For | Effort |
|---|---|---|
| Automatic (Lift & Shift) | Most users | Minimal - enter credentials and go |
| Manual Import | Large databases, custom requirements | More steps, full control |
Automatic Migration (Recommended)
The Lift & Shift feature connects directly to your Supabase Cloud project and transfers your data automatically.
What Gets Migrated
| Component | Automatic | Notes |
|---|---|---|
| Database | Yes | All tables, data, extensions, and schema |
| Storage | Yes | All buckets and files |
| Auth Users | Yes | Part of database migration |
| Auth Providers | Detection only | Secrets must be re-entered manually |
| Edge Functions | No | Use manual import |
Prerequisites
Before starting:
- Create a project in Supascale and start it (required for database migration)
- Gather your Supabase Cloud credentials (see below)
Finding Your Supabase Credentials
You'll need three pieces of information from your Supabase Cloud project:
1. Project URL
- Go to Settings → API in your Supabase dashboard
- Copy the Project URL (e.g.,
https://hkajjfcjmpigqaziopzw.supabase.co)
2. Service Role Key
- On the same Settings → API page
- Under "Project API keys", copy the service_role key (not the anon key)
The service role key has full access to your project. Keep it secure and never expose it in client-side code.
3. Database Password
- This is the password you set when creating your Supabase project
- If you've forgotten it, go to Settings → Database and click "Reset database password"
Step-by-Step Migration
Navigate to Import page
- In Supascale, go to Backups → Import / Migrate
Select your target project
- Choose the Supascale project you want to migrate into
- The project must be running for database migration
Enter Supabase credentials
- Project URL: Your Supabase project URL
- Service Role Key: Your service_role API key
- Database Password: Your Supabase database password
Select components to migrate
- Database (recommended) - Migrates all your data
- Storage (recommended) - Migrates all files and buckets
- Auth Config - Detects OAuth providers (requires manual re-setup)
Click "Start Migration"
Monitor progress
- A dialog will show real-time progress
- The migration streams updates as each step completes
- Large databases may take several minutes
After Migration
Once the migration completes:
Verify your data
- Check your tables in the SQL Editor or Table Editor
- Browse storage files in the Storage Browser
- Test your application against the new project
Update your application
- Change your Supabase URL and keys to point to your Supascale instance
- Update any hardcoded references to the old project URL
Re-configure OAuth providers (if using social login)
- Go to Project Settings → Authentication → Auth Providers
- Re-enter client secrets for each provider
- Update redirect URIs in each provider's dashboard (Google, GitHub, etc.)
- The new redirect URI format is:
https://your-domain/auth/v1/callback
OAuth provider secrets cannot be exported from Supabase Cloud for security reasons. You'll need to copy them from each provider's developer console.
Manual Migration
If you prefer more control or have specific requirements, you can migrate manually.
Step 1: Export Database
From your local machine with psql installed:
# Get your connection string from Supabase Dashboard → Settings → Database pg_dump "postgresql://postgres:[PASSWORD]@db.[PROJECT-REF].supabase.co:5432/postgres" \ -Fc -f backup.dump
Or use a plain SQL dump:
pg_dump "postgresql://postgres:[PASSWORD]@db.[PROJECT-REF].supabase.co:5432/postgres" \ -f backup.sql
Step 2: Export Storage Files
- Go to Storage in your Supabase dashboard
- Download files from each bucket
- Organize them in folders matching your bucket names:
storage/ ├── avatars/ │ └── user1.png ├── documents/ │ └── report.pdf └── public/ └── logo.svg - Create a ZIP archive:
zip -r storage.zip storage/
Step 3: Export Edge Functions
If you have Edge Functions:
# From your project directory tar -czf functions.tar.gz -C supabase functions
Step 4: Import into Supascale
- Go to Backups → Import / Migrate in Supascale
- Select your target project
- Use the manual import cards to upload each file:
- Database: Upload your
.dumpor.sqlfile - Storage: Upload your
.ziparchive - Edge Functions: Upload your
.tar.gzarchive
- Database: Upload your
Troubleshooting
"Project must be running"
The target project needs to be running for database migration. Start the project from the Projects page before attempting migration.
"Failed to connect to source database"
- Verify your database password is correct
- Check that your Supabase project is active (not paused)
- Ensure you're using the correct project URL
"Service role key invalid"
- Make sure you copied the service_role key, not the anon key
- The key should start with
eyJhbGciOi... - Check for any extra spaces when copying
Migration timeout
For very large databases:
- Consider migrating database and storage separately
- Use manual migration with pg_dump for databases over 1GB
- Storage migration handles large files but may take time
Some storage files missing
- Check the output log for any failed file transfers
- Verify bucket permissions in the source project
- Re-run storage migration if needed (it won't duplicate files)
Best Practices
Test first - Create a test project and migrate there before your production migration
Plan downtime - Brief downtime may be needed when switching your application to the new instance
Backup before migrating - Keep your Supabase Cloud project active until you've verified the migration
Update DNS last - Only point your domain to the new instance after verifying everything works
Monitor after migration - Watch logs and application behavior for the first few hours
Related Documentation
- Backups API - Lift & Shift - API documentation for automated migration
- Creating Backups - Set up backups in your new instance
- Auth Providers - Configure social login providers