Use DBOS With Supabase
This guide shows you how to build an application with DBOS and Supabase. While Supabase stores your application's data, DBOS serverlessly hosts its code and makes it resilient to any failure.
1. Connect to Supabase
Visit https://console.dbos.dev/provision and click "Connect Supabase" to connect your DBOS and Supabase accounts.
After connecting your Supabase account, you should see a list of your Supabase projects. Choose one to use with DBOS. When prompted, enter your Supabase database password (you set this when you created your Supabase project, if you forgot it you can reset it from your Supabase dashboard).
Congratulations! You've linked your Supabase project to DBOS. Now, let's deploy a DBOS app to your Supabase database.
2. Select a Template
Visit https://console.dbos.dev/launch. At the top of the page, make sure your Supabase database instance is selected.
Then, choose a template you'd like to deploy.
Not sure which template to use? We recommend the DBOS + FastAPI starter.
3. Connect to GitHub
To ensure you can easily update your project after deploying it, DBOS will create a GitHub repository for it. You can deploy directly from that GitHub repository to DBOS Cloud.
First, sign in to your GitHub account. Then, set your repository name and whether it should be public or private.
4. Deploy to DBOS Cloud
Click "Create GitHub Repo and Deploy" and DBOS will clone a copy of the source code into your GitHub account, then deploy your project to DBOS Cloud. In less than a minute, your app should deploy successfully.
Congratulations, you've successfully deployed an app to DBOS Cloud and Supabase!
5. View Your Application
At this point, your app is deployed, with its very own URL assigned. If you continue to your application page, you can click on the URL to see your application live on the Internet.
To start building, edit your application on GitHub (for the DBOS + FastAPI starter, source code is in app/main.py
), commit your changes, then press "Deploy From GitHub" to see your changes reflected in the live application.
Develop Locally
You can also develop your DBOS application locally while storing its data in Supabase! Here's how:
- Python
- TypeScript
1. Git Clone Your Application
Clone your application from git and enter its directory.
git clone <your-git-url> my-app
cd my-app
2. Set up a Virtual Environment
Create a virtual environment and install dependencies.
- macOS or Linux
- Windows (PowerShell)
- Windows (cmd)
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 -m venv .venv
.venv\Scripts\activate.ps1
pip install -r requirements.txt
python3 -m venv .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt
3. Install the DBOS Cloud CLI
The Cloud CLI requires Node.js 20 or later.
Instructions to install Node.js
- macOS or Linux
- Windows
Run the following commands in your terminal:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 22
nvm use 22
Download Node.js 20 or later from the official Node.js download page and install it.
After installing Node.js, create the following folder: C:\Users\%user%\AppData\Roaming\npm
(%user%
is the Windows user on which you are logged in).
Run this command to install it.
npm i -g @dbos-inc/dbos-cloud@latest
4. Connect to Supabase
Connect your local application to your Supabase database. Enter your Supabase password when prompted. If you don't remember your Supabase password, you can reset it from the Supabase dashboard under Project Settings -> Database.
dbos-cloud db local
5. Run the App
Run these commands to start your app locally!
dbos migrate
dbos start
To see that your app is working, visit this URL in your browser: http://localhost:8000/
Welcome to DBOS!
Congratulations, you've started a DBOS+Supabase app locally! To learn more about building DBOS apps, check out our Python programming guide.
1. Git Clone Your Application
Clone your application from git and enter its directory.
git clone <your-git-url> my-app
cd my-app
2. Install Dependencies
DBOS TypeScript requires Node.js 20 or later.
Instructions to install Node.js
- macOS or Linux
- Windows
Run the following commands in your terminal:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 22
nvm use 22
Download Node.js 20 or later from the official Node.js download page and install it.
After installing Node.js, create the following folder: C:\Users\%user%\AppData\Roaming\npm
(%user%
is the Windows user on which you are logged in).
Install dependencies.
npm install
3. Install the DBOS Cloud CLI
Run this command to install the Cloud CLI globally.
npm i -g @dbos-inc/dbos-cloud@latest
4. Set up a Postgres Database
Connect your local application to your Supabase database. Enter your Supabase password when prompted. If you don't remember your Supabase password, you can reset it from the Supabase dashboard under Project Settings -> Database.
dbos-cloud db local
5. Run the App
Run these commands to build and start your app locally!
npx dbos migrate
npm run build
npx dbos start
To see that your app is working, visit this URL in your browser: http://localhost:3000/
Welcome to DBOS!
Congratulations, you've started a DBOS+Supabase app locally! To learn more about building DBOS apps, check out our TypeScript programming guide.