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
1. Create second project directory:
mkdir ~/projects/my-project-2
cd ~/projects/my-project-22. Initialize:
supabase init --workdir ~/projects/my-project-23. 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 = 543374. 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-2Update your database connection strings in your applications environment variables accordingly to connect to the correct local Supabase instance.