Opens an external site in a new window
Mental Health Awareness Month
“Community”
RODNEY LAB
  • Home
  • Plus +
  • Newsletter
  • Links
  • Profile
RODNEY LAB
  • Home
  • Plus +
  • Newsletter
  • Links

Create Local PostgreSQL Databases using Supabase CLI # Create Local PostgreSQL Databases using Supabase CLI #

blurry low resolution placeholder image Create Local PostgreSQL Databases
  1. Home Rodney Lab Home
  2. Blog Posts Rodney Lab Blog Posts
  3. PostgreSQL PostgreSQL Blog Posts
<PREVIOUS POST
NEXT POST >
LATEST POST >>

Create Local PostgreSQL Databases using Supabase CLI #

Published: 4 years ago
2 minute read
Gunning Fog Index: 6.9
Content by Rodney
blurry low resolution placeholder image Author Image: Rodney from Rodney Lab
SHARE:

🌟 How to Spin up a PostgreSQL Development Server with Supabase CLI #

There are several reasons you might want to create local PostgreSQL databases. You might be trying out Prisma (as suggested in this video). Alternatively, you might need a local development database for an API you are building. Whatever your reason, you will see it can be pretty quick to create local PostgreSQL databases using Supabase CLI.

An alternative is Docker Compose, though you will see Supabase uses this method, behind the scenes, saving you having to create the docker-compose.yml file. Anyway, let’s crack on and see just how we can do the magic.

📹 Create Local PostgreSQL Databases: Video #

Please enable JavaScript to watch the video 📼

Create Local PostgreSQL Databases using Supabase CLI

🖥 Code #

Installing Docker #

You need to have Docker and Docker Compose installed on your machine to run Supabase CLI.

    
# macOS
brew install docker
docker --version
docker-compose --version
Installing Docker

For Linux, there are detailed instructions on the Docker site . You can see additional macOS installation instructions on the Docker site . There are also Windows Docker installation instructions  there.

Installing Supabase CLI #

One-off Supabase setup:

    
pnpm add -g supabase
Installing Supabase CLI

Spinning up a Local PostgreSQL Database #

In your project folder, just run these two commands:

    
supabase init
supabase start
Spinning up a Local PostgreSQL Database

🗳 Poll #

Have you already tried Supabase?
Voting reveals latest results.

🔗 Create Local PostgreSQL Databases: Links #

  • Supabase CLI documentation  ,
  • Getting started with Prisma 

🙏🏽 Feedback #

If you have found this video useful, see links below for further related content on this site. I do hope you learned one new thing from the video. Let me know if there are any ways I can improve on it. I hope you will use the code or starter in your own projects. Be sure to share your work on Twitter, giving me a mention, so I can see what you did. Finally, be sure to let me know ideas for other short videos you would like to see. Read on to find ways to get in touch, further below. If you have found this post useful, even though you can only afford even a tiny contribution, please consider supporting me through Buy me a Coffee.

Finally, feel free to share the post on your social media accounts for all your followers who will find it useful. As well as leaving a comment below, you can get in touch via @askRodney on Twitter and also askRodney on Telegram . Also, see further ways to get in touch with Rodney Lab. I post regularly on SvelteKit as well as Search Engine Optimization among other topics. Also, subscribe to the newsletter to keep up-to-date with our latest projects.

Thanks for reading this post. I hope you found it valuable. Please get in touch with your feedback and suggestions for posts you would like to see. Read more about me …

blurry low resolution placeholder image Rodney from Rodney Lab
TAGS:
POSTGRESQL

Likes:

Likes

  • Vinny profile avatar
Likes provided by Mastodon & X via Webmentions.

Related Posts

blurry low resolution placeholder image SvelteKit Session Cookies: going HttpOnly

SvelteKit Session Cookies: going HttpOnly

sveltekit
<PREVIOUS POST
NEXT POST >
LATEST POST >>

Leave a comment …

Your information will be handled in line with our Privacy Policy .

Ask for more

1 Nov 2022 — Astro Server-Side Rendering: Edge Search Site
3 Oct 2022 — Svelte eCommerce Site: SvelteKit Snipcart Storefront
1 Sept 2022 — Get Started with SvelteKit Headless WordPress

Copyright © 2020 – 2025 Rodney Johnson. All Rights Reserved. Please read important copyright and intellectual property information.

  • Home
  • Profile
  • Plus +
  • Newsletter
  • Contact
  • Links
  • Terms of Use
  • Privacy Policy
We use cookies  to enhance visitors’ experience. Please click the “Options” button to make your choice.  Learn more here.