Skip to content

Instantly share code, notes, and snippets.

@ThingEngineer
Last active February 2, 2026 17:29
Show Gist options
  • Select an option

  • Save ThingEngineer/27de580744b73a382d1832fde5423a56 to your computer and use it in GitHub Desktop.

Select an option

Save ThingEngineer/27de580744b73a382d1832fde5423a56 to your computer and use it in GitHub Desktop.

Setup Multiple Local Supabase Projects

Project 1 (Current - my-project) default settings:

  • API: 54321, DB: 54322, DB.POOLER: 54329, Studio: 54323, Inbucket: 54324, Analytics: 54327, Edge Inspector: 8382

Project 2 (New - my-project-2):

  • API: 54331, DB: 54332, DB.POOLER: 54339, Studio: 54333, Inbucket: 54334, Analytics: 54337, Edge Inspector: 8383

Steps:

1. Create second project directory:

mkdir ~/projects/my-project-2
cd ~/projects/my-project-2

2. Initialize:

supabase init --workdir ~/projects/my-project-2

3. Edit config.toml in my-project-2:

Choose different ports to avoid conflicts with the first project. Update the supabase/config.toml file as follows:

project_id = "my-project-2"

[api]
port = 54331

[db]
port = 54332
shadow_port = 54330

[db.pooler]
port = 54339

[studio]
port = 54333

[inbucket]
port = 54334

[edge_runtime]
inspector_port = 8383

[analytics]
port = 54337

4. Usage:

You can now start/stop and interact with each Supabase cli project separately just by working in the respective directories in the terminal or by specifying the workdir flag.

supabase start --workdir /projects/my-project-2

supabase status --workdir /projects/my-project-2

supabase stop --workdir /projects/my-project-2

Update your database connection strings in your applications environment variables accordingly to connect to the correct local Supabase instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment