Skip to content
Otoshek
OTOSHEK · DOCS
Docs/Supabase
TUTORIAL · SUPABASEscheduleRead · 7 min

Supabase Postgres Setup Guide

VIDEO

Walkthrough

1:44
play_arrow

Video Walkthrough (1:44)

1:44

This video is a demo of what is described on the page. It walks through how to configure a free Supabase Postgres database and collect the credentials.

Download Deployment Variables Template
Markdown is preferred, but you can download a plain text version too.

If you have not downloaded your deployment variables file yet, this is a good time to do it.

Choose Azure or GCP below. In this platform, you can either enter variables manually, one card and one field at a time, or use bulk mode. In bulk mode, you fill this template as you go and later paste everything into one textarea, and the platform will sort and validate the variables for you.

If you prefer, you can also copy the templates directly from the Azure bulk format page or the GCP bulk format page.

Deployment target

This guide will walk you through creating a free Postgres database using Supabase. Follow the video or the written instructions below to get your database credentials.

01

Create Your Supabase Organization

STEP 01

After signing up for Supabase, you'll land on a page to create a new organization.

  1. Enter a name for your organization.
  2. Keep the type as 'Personal' to stay on the free plan.
  3. Click 'Create Organization'.
Supabase Create Organization page with organization name input and create button
Supabase Create Organization page with organization name input and create buttonClick to enlarge ↗
02

Create a New Project & Save the Password

STEP 02

Next, it's time to create the project which will contain your database.

  1. Give your project a name.
  2. Pick the region closest to you or your users for the best performance.
  3. For the database password, you can use the 'Generate a secure one' button.
Screenshot of the 'Create new project' form with name, region, and password fields.
Screenshot of the 'Create new project' form with name, region, and password fields.Click to enlarge ↗
Screenshot showing the generated password being copied and pasted into a local file for safekeeping.
Screenshot showing the generated password being copied and pasted into a local file for safekeeping.Click to enlarge ↗

Once you have saved the password, click 'Create new project'.

03

Find Your Connection Details

STEP 03

After your project has been created, you can find the credentials needed to connect to it.

  1. In your project dashboard, find and click the 'Connect' button in the sidebar.
    Screenshot highlighting the 'Connect' button in the Supabase project dashboard.
    Screenshot highlighting the 'Connect' button in the Supabase project dashboard.Click to enlarge ↗
  2. In the 'Connection String' section, click the URI dropdown and select 'Python'.
    Screenshot showing the dropdown menu with 'Python' selected for the connection string.
    Screenshot showing the dropdown menu with 'Python' selected for the connection string.Click to enlarge ↗
  3. Scroll down to the 'Transaction Pooler' area. You can either copy the entire .env block or click 'View Variables' to see and copy them one by one.
    Screenshot of the '.env' section for the Transaction Pooler, showing the variables.
    Screenshot of the '.env' section for the Transaction Pooler, showing the variables.Click to enlarge ↗

Credentials ready

HANDOFF

Your Database Credentials

These are the values you should have collected. Store them securely.

.env · postgres5 KEYS
DB_HOST=<Your database host>
DB_PORT=<Your database port>
DB_NAME=postgres
DB_USER=postgres
DB_PASSWORD=<The password you saved in Step 2>

Important: Keep these credentials secure and never commit them to version control.