Supabase integration
How to set up the Release Supabase integration for instant databases
Release integrates with Supabase to provision PostgreSQL databases for your ephemeral environments. Supabase's branching feature allows Release to automatically create isolated database branches, giving each environment its own database instance.
Prerequisites
Before setting up the Supabase integration in Release, you'll need:
A Supabase account (sign up at supabase.com)
A Supabase project on the Pro plan (branching requires Pro or above)
A Supabase access token
Step 1: Create a Supabase Account and Project
Sign up or log in at supabase.com/dashboard.
Create a new project (or use an existing one). Note the region your project is in — you'll need this when creating a dataset.
Step 2: Create an Access Token in Supabase
Release connects to Supabase using an access token. You'll need to create one from your account settings.
In the Supabase Dashboard, click your avatar in the top-right corner and select Account preferences, or navigate directly to Account > Access Tokens.

Click Generate new token.

Enter a name for the token (e.g.,
release-integration).Set the expiration to Never for production use.
Click Generate token.

Important: Copy the access token value immediately. It will not be shown again.
Step 3: Install the Supabase Integration in Release
In the Release UI, navigate to Configuration > Integrations (accessible at
/workspaces/<workspace-id>/configuration/integrations).

Find Supabase under the Available section and click on it.
Click Install Supabase.
Enter your Access Token from Step 2.
Click Install Integration.
The integration is now installed and will appear under the Installed section on the Integrations page.

Step 4: Create a Supabase Dataset
Once the integration is installed, you can create datasets that use Supabase as the database provider.
Navigate to Configuration > Datasets.
Click Create Dataset. If the Supabase integration is installed, you'll see a Supabase tab alongside the other provider tabs.
Select the Supabase tab.
Enter a Dataset Name (3-50 characters, lowercase letters, numbers, and hyphens).
Select a Supabase Project from the dropdown. This lists all projects accessible to your access token.
Optionally change the Database Name (defaults to
postgres).Configure the Number of available databases (how many branches to keep in the pool).
Click Create Dataset.

How It Works
When Release creates an ephemeral environment that uses a Supabase dataset:
Release creates a new branch from the default branch of your Supabase project.
The branch is monitored until it reaches a healthy state.
Connection credentials are generated using the Supabase session pooler for IPv4 compatibility.
Credentials are automatically injected as environment variables into your services.
When the environment is torn down, the branch is deleted to clean up resources.
Environment Variables
The following environment variables are automatically set for services using Supabase datasets. The prefix is derived from the dataset name (uppercased, with hyphens replaced by underscores).
For example, a dataset named my-app would produce:
MY_APP_DB_POOL_HOST
Supabase session pooler hostname (IPv4 compatible)
MY_APP_DB_POOL_PASS
Database password
MY_APP_DB_POOL_USER
Database username (in postgres.<branch-ref> format)
MY_APP_DB_POOL_DATABASE_NAME
Database name (default: postgres)
MY_APP_DB_POOL_NAME
Branch name created by Release
Important: Schema Only, No Data
Unlike some other database providers, Supabase branches only include the schema from your parent project — they do not copy data. This is a Supabase design decision to protect production data.
If your ephemeral environments need seed data, you have two options:
Seed file: Add a
supabase/seed.sqlfile to your repository. Supabase runs this automatically when creating branches via the GitHub integration.Application-level seeding: Run database seeds as part of your deployment process (e.g.,
rails db:seedor a migration step).
Connection Details
Release uses the Supabase session pooler to connect to branch databases. This provides IPv4 connectivity, which is required for most Kubernetes environments. The connection details are:
Host: The Supabase session pooler (e.g.,
aws-1-us-west-2.pooler.supabase.com)Port:
5432User:
postgres.<branch-ref>(the pooler requires this format)SSL: Required (
sslmode=require)
Your application should use these environment variables to construct its database connection string:
Updating the Integration
To update your Supabase credentials:
Go to Configuration > Integrations > Supabase.
Click Actions > Configure.
Update the Access Token as needed.
Click Save.
Troubleshooting
Integration won't connect
Verify your access token hasn't been revoked
Ensure the access token has access to the projects you want to use
You can test your token by running:
curl -H "Authorization: Bearer <your-token>" https://api.supabase.com/v1/projects
Branches not creating
Verify your Supabase project is on the Pro plan or above — branching is not available on the Free tier
If you see a "plan limitation" error, upgrade your Supabase project plan
Check that your project is in a healthy state in the Supabase Dashboard
Connection issues in environments
Supabase requires SSL connections — ensure your application is configured to use
sslmode=requireSupabase is PostgreSQL-only — ensure your application's database driver is configured for PostgreSQL
The connection uses the Supabase session pooler for IPv4 compatibility. If you see "tenant not found" errors, the branch may still be provisioning — wait a moment and retry
Verify the environment variables are set correctly by running
env | grep DB_POOLinside your container
Last updated
Was this helpful?