Source:
ocean/docs/SETUP_DATABASE_PASSWORD.md| ✏️ Edit on GitHub
Setting Up Database Password
1. Set Database Password in Supabase
- Go to: https://supabase.com/dashboard/project/fldiayolmgphysdwgsuk/settings/database
- Click on "Reset database password"
- Generate a strong password or use your own
- IMPORTANT: Save this password securely - you'll need it for CLI and migrations
2. Add to Local Environment
Create or update .env.local:
# Supabase Database Password for CLI operations
SUPABASE_DB_PASSWORD=your_database_password_here
3. Add to Vercel Environment
- Go to: https://vercel.com/your-team/ocean/settings/environment-variables
- Add new variable:
- Name:
SUPABASE_DB_PASSWORD - Value: [your database password]
- Environment: All environments (Production, Preview, Development)
- Name:
4. Update .gitignore
Make sure .env.local is in .gitignore:
.env.local
5. Use with Supabase CLI
Once set up, you can use the password with CLI commands:
# Set as environment variable
export SUPABASE_DB_PASSWORD='your_password'
# Or use directly in commands
supabase db push --password $SUPABASE_DB_PASSWORD
# Or let it prompt and paste from clipboard
supabase db push
Benefits
- Automated Deployments: Can run migrations in CI/CD
- CLI Access: Full access to Supabase CLI commands
- Backup/Restore: Can backup and restore database
- Schema Management: Can manage database schema via migrations
Security Notes
- Never commit the password to git
- Use strong, unique password
- Rotate periodically
- Store securely in password manager