Multiple projects in local Supabase #5968
-
Hi, When working with local Supabase (via Docker), I didn't see the option to add multiple projects. The cloud version has this possibility. Do you plan to add the ability to create multiple projects on Supabase locally? Or should I create multiple instances of supabase, each under a separate project that uses it?
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 24 replies
-
This was the last thing I’ve seen on this… |
Beta Was this translation helpful? Give feedback.
-
With multiple projects inside a local supabase out of scope and not an option moving forward will there be any complications running 2 or more local supabase stacks with docker running through the regular install/setup process? I'm trying to confirm before any dev time is spent on this. My curiosity on how this works limited to 1, and having to run multiple containers is in the container names, ports, db(db) user(postgres) exactly the same when composing up? We foresee in the near future needing the abstraction but also the ease to communicate back and fourth how we'd have them in production. Depending on the answer to the above question the following context may help. I'd prefer not in anyway manipulate the supabase clones if we must have several. The hope would be they all remain true to your deploy without alteration to avoid any migration or deployment issues. @GaryAustin1 any help would be appreciated answering the above 👍 Thank you! |
Beta Was this translation helpful? Give feedback.
-
You can achieve it by running multiple instances of supabase docker image. It's not super convenient out of the box, but you can write a script to easily automate this.
Now you can have both instances running, one on :3000, with API on :8000. and another on :3100, with API on :8100, totally separate database and everything. (I only tested the basic usage, haven't fully tested if everything is working) |
Beta Was this translation helpful? Give feedback.
-
Would love to be able to specify the
|
Beta Was this translation helpful? Give feedback.
-
I've found that updating the |
Beta Was this translation helpful? Give feedback.
-
@liyangguang @code-leen do these ways work with docker ? @liyangguang I am getting a lot of errors trying to change all the services ports as there are a lot of settings in the volumes with preset ports. I am sorry for asking stupid questions but I am new to docker and supabase and there is not much info about setting up multiple databases in the same server with supabase. |
Beta Was this translation helpful? Give feedback.
@znowfox @Geczy @martwozniak
I updated the port numbers and the
project_id
in theconfig.toml
. These values must be different between your projects so they do not conflict on your local machine. Theconfig.toml
can be found at the '/supabase' directory in your project. This solution works for my use-case with having two different database instances utilizing Supabase, and I can see the two different sets of containers when viewing it in the Docker dashboard.After making changes to these files, the docs mention you will need to run
supabase stop
andsupabase start
for it to work.Here is an example of how the
config.toml
files will look.Project 1: