How to connect Supabase to Payload CMS

Petipois
3 min readDec 3, 2023
Photo by Lavi Perchik on Unsplash

With the release of Payload 2.0, the support for the Postgres Database had me intrigued as I have recently become a bit obsessed with Supabase, a Backend-as-a-service platform that uses Postgres.

In this tutorial, I will show how to integrate Supabase into a Payload CMS project.

Prerequisites
Familiar with Payload CMS
Familiar with Supabase

Create a Supabase Project

Start by going to the Supabase website at https://supabase.com. Once there, you'll need to create a new account. This process involves providing some basic information about yourself, including your name and email address, then click sign up for a free account.

Create a new project

Navigate to Database in the side menu and copy the Postgress URI:

In a separate file paste your URI and replace [YOUR-PASSWORD] with the password of the supabase database.

Now we have what we need to connect supabase to our Payload Application.

Create a Payload Application

--

--

Petipois

Freelance technical writer with a passion for technology, full-stack web and game development. - https://petipois.com