Supabase is an open source Firebase alternative. We’re building the features of Firebase using enterprise-grade open source tools.
- Hosted Postgres Database. Docs
- Authentication and Authorization. Docs
- Auto-generated APIs.
- File Storage. Docs
For full documentation, visit supabase.com/docs
To see how to Contribute, visit Getting Started
Community & Support
- Community Forum. Best for: help with building, discussion about database best practices.
- GitHub Issues. Best for: bugs and errors you encounter using Supabase.
- Email Support. Best for: problems with your database or infrastructure.
- Discord. Best for: sharing your applications and hanging out with the community.
- Alpha: We are testing Supabase with a closed set of customers
- Public Alpha: Anyone can sign up over at app.supabase.io. But go easy on us, there are a few kinks
- Public Beta: Stable enough for most non-enterprise use-cases
- Public: Production-ready
We are currently in Public Beta. Watch “releases” of this repo to get notified of major updates.
How it works
Supabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn’t exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.
Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.
- PostgreSQL is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
- Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres’ built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
- PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API
- Storage provides a RESTful interface for managing Files stored in S3, using Postgres to manage permissions.
- postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
- GoTrue is an SWT based API for managing users and issuing SWT tokens.
- Kong is a cloud-native API gateway.
Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.
|Language||Client||Feature-Clients (bundled in Supabase client)|
|⚡️ Official ⚡️|
|💚 Community 💚|
Each project on Supabase comes with these features:
- A dedicated Postgres database. Learn more
- Auto-generated APIs. Learn more
- Auth and User management. Learn more
- Storage. Learn more
- Sign in to app.supabase.io
Supabase provides a CLI so that you can develop your application locally, with the ability to deploy your application to the Supabase platform.
Before we begin, make sure you have these installed on your local machine:
Supabase CLI login
After installing the Supabase CLI you can log in using your Supabase account (sign up at app.supabase.io).
This is a one-time operation. After you have logged in the CLI will have permissions to manage your Supabase projects.
Initialize your project
Let’s create a new folder on your local machine:
# create your project folder
# move into the new folder
# start a new git repository
These commands will create an empty folder for your project and start a new git repository.
Let’s initialize Supabase inside the folder that you created:
This command will create a
supabase folder which holds all the configuration for developing your project locally.
The start command uses Docker to start the open source services of Supabase. This command may take a while to run if this is the first time using the CLI.
Once all of the Supabase services are running, you’ll see an output that contains your local Supabase credentials.
You can use the stop command at any time to stop all services.
Accessing Services Directly
- API Gateway
# Default URL:
The local Postgres instance can be accessed through
psql or any other Postgres client, such as pgadmin.
Database changes are managed through “migrations”. Database migrations are a common way of tracking changes to your database over time.
Making database changes
For this guide, let’s create a table called
employees, using the “Supabase Studio” link provided.
If you’re familiar with databases, you can also execute any SQL using the
DB URL shown by
Open the Studio, navigate to the “SQL Editor” section, and run the following SQL command:
create table employees (
id integer primary key generated always as identity,
Now we have the
employees table in the local database, but how do we incorporate this into migrations? The CLI automatically detects changes by running the commit command:
supabase db commit create_employees
This creates a new migration named
supabase/migrations/<timestamp>_create_employees.sql, representing any changes we’ve made to the local database since
Let’s add some sample data into the table. We can use the seed script in
-- in supabase/seed.sql
insert into employees (name)
Now run the following to rerun the migration scripts and the seed script:
supabase db reset
If you look again within Studio, you should now see the contents of
Resetting database changes
If you run any SQL on the local database that you want to revert, you can use the
-- run on local database to make a change
alter table employees
add department text default 'Hooli';
To revert this change we can run:
supabase db reset
And the local database will be reset.
Now that you’ve developed an application locally, head over to app.supabase.io and create a project where we can deploy the changes.
Linking your project
There are a few commands required to link your project. We are in the process of consolidating these commands into a single command. Bear with us!
Let’s associate your project with your remote project using supabase link and db remote set
# Use "supabase link --project-ref your-project-ref" to link your project in one step.
supabase db remote set 'postgresql://postgres:<your_password>@db.<your_project_ref>.supabase.co:5432/postgres'
# Use the connection string from your Supabase project here.
supabase db remote commit
# capture any changes that you have made to your database before setting up the CLI
You’ll notice that
supabase/migrations is now populated with a migration in
..._remote_commit.sql. This migration captures any changes required for your local database to match the schema of your remote Supabase project.
Deploying Database changes
You can deploy any local database migrations using
supabase db push
Deploying Edge Functions