Installation

<aside>

As a prerequisite, you must install a container runtime (Docker Desktop) compatible with Docker APIs.

</aside>

Install the Supabase CLI:

npm install supabase --save-dev

If you have installed the CLI as dev dependency via npm, you can update it with:

npm update supabase --save-dev

<aside>

If you have any Supabase containers running locally, stop them and delete their data volumes before proceeding with the upgrade. This ensures that Supabase managed services can apply new migrations on a clean state of the local database.

</aside>

image.png

Running

In your repo, initialize the Supabase project:

npx supabase init

This will create a new supabase folder. It's safe to commit this folder to your version control system.

Start the Supabase stack:

npx supabase start

This takes time on your first run because the CLI needs to download the Docker images to your local machine. The CLI includes the entire Supabase toolset, and a few additional images that are useful for local development (like a local SMTP server and a database diff tool).

Stopping local services

When you are finished working on your Supabase project, you can stop the stack (without resetting your local database):

npx supabase stop

Access your project's services

Once all of the Supabase services are running, you'll see output containing your local Supabase credentials.