Fastabase is a solution to self-host Supabase on AWS and use PlanetScale Postgres as the database provider.
Fastabase is built using several components:
- SST to orchestrate the deployment to AWS
- OpenNext to deploy Supabase Studio as a serverless component
- Supabase components like Storage, Auth, etc.
- Most of the Supabase components are deployed as Docker containers to ECS Fargate
- Entrypoint for Supabase API is an Application Load Balancer behind a CloudFront distribution
- Amazon SES SMTP servers are used for sending emails
- Supabase Studio is deployed using OpenNext
- Studio is protected by user/password auth via a CloudFront function
- Install Node.js 22 and pnpm
- Enable pg_stat_statements and pg_cron extensions in PlanetScale on the "Cluster configuration" -> "Extensions" tab
To deploy Fastabase you would need to follow these steps:
-
Init Git submodules:
git submodule update --init -
Create a config.yaml configuration file:
cp config.yaml.example config.yaml -
Fill in the config.yaml file with the required information.
-
Install all the dependencies:
-
Set up the AWS credentials.
export AWS_PROFILE=<profile>Note: To learn how to set up the AWS credentials in your terminal, please refer to the AWS documentation.
-
Run the deployment:
To remove the Fastabase deployment, run:
Core Supabase components:
- Auth
- Storage
- PostgREST
- Imgproxy
- Pg-meta
- Realtime
- Edge functions
- Logs
Customization:
- External auth providers
- Custom domain
- OpenAI API key
Improvements:
- Show real DB credentials in the Studio's "Connect" dialog (currently hardcoded to localhost in Supabase's codebase)
-
By default, Amazon SES is in sandbox mode, which means you can only send emails from and to verified email addresses. Make sure to exit the sandbox mode before sending emails to real users.
-
Realtime component currently can't be used with PlanetScale, because PlanetScale requires SSL and Realtime component doesn't allow SSL to be configured for the database connection.
.png)
