Supabase

How to set up Supabase local development environment?

Discover the simplest way to set up Supabase for local development in this easy-to-follow guide. Ideal for developers eager to optimize their workflow.

Developer profile skeleton
a developer thinking

Overview

Setting up a local development environment for Supabase involves a few crucial steps that make developing and testing your applications a breeze. First off, you’ll need to install some key dependencies. Once that’s sorted, setting up Docker comes next for easy containerized deployment. Next, you'll need to configure your environment variables to keep everything running smoothly. After that, you’ll initialize your Supabase project. Knowledge of Git, Docker Compose, and Node.js can be quite handy during this process. Getting your local environment set up the right way means you can develop locally and still have room to scale when moving to production. This guide will take you through each step, ensuring your Supabase local environment is up and running without hiccups.

Get a Free No-Code Consultation
Meet with Will, CEO at Bootstrapped to get a Free No-Code Consultation
Book a Call
Will Hawkins
CEO at Bootstrapped

How to set up Supabase local development environment?

Step 1: Install Docker

First things first, make sure Docker is up and running on your machine. Supabase uses Docker containers for its local development environment. You can grab Docker from the official website.

Step 2: Install Node.js and NPM

Next up, you'll need Node.js and npm (Node Package Manager). Head over to the official Node.js website and get the latest version.

Step 3: Install `Supabase CLI`

The Supabase Command Line Interface (CLI) is a must-have for managing Supabase services locally. Install it globally using npm:

npm install -g supabase

Step 4: Initialize a Supabase Project

Navigate to or create a new directory for your project:

mkdir my-supabase-project
cd my-supabase-project

Initialize the Supabase project with this command, which sets up the necessary configuration files:

supabase init

Step 5: Start Supabase Services Locally

Fire up the local Supabase services (Postgres, the API server, etc.):

supabase start

This command uses Docker to spin up the needed containers. It might take a bit longer the first time you run it.

Step 6: Access Supabase Studio

Once the services are up and running, Supabase Studio will be available at http://localhost:54323. Open this URL in your browser to interact with your local Supabase instance.

Step 7: Configure Environment Variables

Supabase uses environment variables for configuration. Make sure the .env file is set up correctly in your project directory. Usually, the supabase init command generates a .env file with default settings.

Step 8: Apply Database Migrations

Apply any pending database migrations to keep your local database schema up to date:

supabase db push

Step 9: Connect to the Database

Use a SQL client to connect to the local Supabase Postgres database. The connection details (hostname, port, user, password) are usually found in the .env file or supabase/config.toml.

Step 10: Develop Your Application

With the Supabase services running locally, you can start developing your application and interact with your local Supabase instance just like you would with a remote one.

Step 11: Stop Supabase Services

When you're done with development, stop the running Supabase services by pressing Ctrl+C in the terminal window where supabase start was executed or by using:

supabase stop

Explore more Supabase tutorials

Complete Guide to Supabase: Tutorials, Tips, and Best Practices

Explore our Supabase tutorials directory - an essential resource for learning how to create, deploy and manage robust server-side applications with ease and efficiency.

Why are companies choosing Bootstrapped?

40-60%

Faster with no-code

Nocode tools allow us to develop and deploy your new application 40-60% faster than regular app development methods.

90 days

From idea to MVP

Save time, money, and energy with an optimized hiring process. Access a pool of experts who are sourced, vetted, and matched to meet your precise requirements.

1 283 apps

built by our developers

With the Bootstrapped platform, managing projects and developers has never been easier.

hero graphic

Our capabilities

Bootstrapped offers a comprehensive suite of capabilities tailored for startups. Our expertise spans web and mobile app development, utilizing the latest technologies to ensure high performance and scalability. The team excels in creating intuitive user interfaces and seamless user experiences. We employ agile methodologies for flexible and efficient project management, ensuring timely delivery and adaptability to changing requirements. Additionally, Bootstrapped provides continuous support and maintenance, helping startups grow and evolve their digital products. Our services are designed to be affordable and high-quality, making them an ideal partner for new ventures.

Engineered for you

1

Fast Development: Bootstrapped specializes in helping startup founders build web and mobile apps quickly, ensuring a fast go-to-market strategy.

2

Tailored Solutions: The company offers customized app development, adapting to specific business needs and goals, which ensures your app stands out in the competitive market.

3

Expert Team: With a team of experienced developers and designers, Bootstrapped ensures high-quality, reliable, and scalable app solutions.

4

Affordable Pricing: Ideal for startups, Bootstrapped offers cost-effective development services without compromising on quality.

5

Supportive Partnership: Beyond development, Bootstrapped provides ongoing support and consultation, fostering long-term success for your startup.

6

Agile Methodology: Utilizing agile development practices, Bootstrapped ensures flexibility, iterative progress, and swift adaptation to changes, enhancing project success.

Yes, if you can dream it, we can build it.