This guide will walk you through setting up the Supabase Management Console Platform (MCP) - which is basically the fancy name for the dashboard, often called "Studio" - locally.
We'll follow the official Supabase guide but break it down to make it super clear. Ready? Let's dive in!
What You'll Need First (Prerequisites)
Before we start typing commands, make sure you have these tools installed on your computer. If you don't, take a few minutes to grab them:
- Git: This is a tool developers use to manage code and download projects from places like GitHub. (You probably already have this if you do any coding).
- Check if installed: Open your terminal or command prompt and type
git --version
. If you see a version number, you're good! - Get it: https://git-scm.com/downloads
- Check if installed: Open your terminal or command prompt and type
- Docker Desktop: Supabase uses Docker to run all the different parts of its backend (like the database) in neat little packages called containers. You need Docker Desktop running for the local Supabase stuff to work.
- Check if installed: Look for the Docker Desktop application. Make sure it's running!
- Get it: https://www.docker.com/products/docker-desktop/
- Node.js and npm/pnpm: Node.js lets you run JavaScript code outside a web browser, and
npm
orpnpm
are package managers that help install code libraries. The Supabase Studio project usespnpm
, so we'll focus on that.- Check if Node.js/npm installed: Open your terminal and type
node -v
andnpm -v
. You should see version numbers. - Get Node.js & npm: https://nodejs.org/ (LTS version is usually best)
- Get pnpm: Once you have Node.js/npm, open your terminal and run:
npm install -g pnpm
- Check if Node.js/npm installed: Open your terminal and type
- Supabase CLI: This is the command-line tool Supabase provides to manage your local and hosted projects.
- Check if installed: Open your terminal and type
supabase --version
. - Get it: Follow the instructions here: https://supabase.com/docs/guides/cli/getting-started (Usually involves
npm install -g supabase
or using other package managers like Homebrew).
- Check if installed: Open your terminal and type
Got all that installed and ready? Awesome! Let's move on to the fun part.
Setting Up Your Local Supabase Studio (MCP)
Okay, open your favorite terminal or command prompt window. We're going to type a few commands.
Step 1: Get the Supabase Code
First, we need to download the main Supabase code repository from GitHub. This includes the code for the Studio dashboard.
git clone --depth 1 https://github.com/supabase/supabase.git
git clone
: Tells Git to copy a repository.--depth 1
: This is a little trick to download only the latest version, making it much faster!https://github.com/supabase/supabase.git
: This is the web address of the code.
Step 2: Go into the Studio Folder
Now, navigate into the specific folder where the Studio code lives.
cd supabase/apps/studio
cd
: Stands for "change directory". You're just moving into the folder structure you just downloaded.
Step 3: Copy the Example Settings
Projects often have example configuration files. We need to copy the example environment file (.env.example
) to a new file called .env
. This .env
file is where sensitive info or specific settings would go (though for local setup, the defaults are usually fine).
cp .env.example .env
cp
: Stands for "copy".
Step 4: Install All the Project Dependencies
The Studio dashboard is built using lots of smaller code libraries. We need to download and install all of them using pnpm
.
pnpm install
- This command reads a file called
package.json
(andpnpm-lock.yaml
) in the folder and downloads all the necessary code packages listed there. This might take a few minutes, so grab a quick snack!
Step 5: Connect Your Local Studio to the Supabase CLI
This step makes sure that the Studio code you just downloaded can correctly talk to the Supabase CLI tool you installed earlier.
# Make sure your global Supabase CLI is linked
# (You might only need this if you installed the CLI differently or have issues)
# npm link supabase # or use the package manager you used to install the CLI
# Then link the Studio project to use the CLI
pnpm link --global @supabase/cli
- This basically creates a shortcut so the
supabase
commands work correctly within this project environment.
Step 6: Start the Local Supabase Backend
Before you can run the dashboard interface, you need the actual Supabase backend (database, authentication, etc.) running locally. The Supabase CLI makes this easy!
Make sure Docker Desktop is running! Then, run this command in the same supabase/apps/studio
directory:
supabase start
- This command tells the Supabase CLI to spin up all the necessary services using Docker.
- It will take a little while the first time as it downloads the Docker images.
- Watch the output! It will print out important information like:
API URL
DB URL
Studio URL
(This is usually for the old local studio, you can ignore it for this guide)anon key
service_role key
- Keep this terminal window open! The local Supabase backend needs to stay running. You might need the
anon key
later if the Studio asks for it, but usually, it connects automatically.
Step 7: Run the Studio Development Server!
Okay, the backend is running in one terminal. Now, open a new terminal window (or tab), make sure you are still inside the supabase/apps/studio
directory, and run this command:
pnpm dev
- This command starts a local web server that serves the Supabase Studio dashboard interface you just built.
- You'll see some output, and it should tell you that the server is running, usually on a specific address like
http://localhost:8082
.
Step 8: Open Your Local Dashboard!
Almost there! Open your web browser (like Chrome, Firefox, Safari) and go to the address mentioned in the previous step's output. It's typically:
➡️ http://localhost:8082 ⬅️
You should see the familiar Supabase Studio interface! It will automatically connect to the local Supabase backend you started with supabase start
. You can now create tables, manage users, run SQL queries, etc., just like you would on the hosted platform, but it's all running on your machine.
You Did It!
Awesome job! You now have the Supabase Studio dashboard running locally. You can explore its features, see how it works, or even try making changes if you're feeling adventurous.
To stop everything:
- Go to the terminal window running
pnpm dev
(the Studio frontend) and pressCtrl + C
. - Go to the terminal window running
supabase start
(the Supabase backend) and runsupabase stop
. - You can also shut down Docker Desktop if you're done with it.
Have fun exploring your local Supabase setup!
Okay, adding a helpful FAQ section is a great idea! Here are a few questions and answers you can add to the end of your Markdown article, covering both general Supabase stuff and the local MCP/Studio setup.
FAQs: Supabase & Local Studio Setup
Got questions? We've got answers! Here are some common things people ask about Supabase and running the Studio locally.
General Supabase Questions
-
Q: Wait, what exactly is Supabase again?
- A: Think of Supabase as an open-source alternative to Firebase. It gives you a bunch of backend tools really fast, like a Postgres database, user authentication (login/signup), file storage, and more, all accessible through easy-to-use libraries.
-
Q: Is Supabase just a database?
- A: Nope! While it includes a powerful Postgres database, Supabase is a whole suite of tools. You get authentication, storage, real-time updates, serverless functions (called Edge Functions), and the awesome dashboard (Studio) to manage it all.
-
Q: Is Supabase free to use?
- A: Yes! Supabase has a generous free tier that's perfect for getting started and for many smaller projects. They also have paid plans if your project grows and needs more resources. Running it locally like in this guide is also free (besides your computer's resources, of course!).
-
Q: Can I use Supabase with my favorite web framework like React, Vue, or Svelte?
- A: Absolutely! Supabase provides client libraries (helper code) specifically for JavaScript and popular frameworks, making it super easy to integrate into your projects.
Local Studio (MCP) Setup Questions
-
Q: Why would I bother running the Supabase dashboard locally?
- A: Great question! You might do this to:
- Work on your project even when you're offline.
- See how the dashboard itself works under the hood.
- Contribute code or fix bugs in the Studio project itself.
- Test new features before they are officially released.
- A: Great question! You might do this to:
-
Q: Do I really need Docker Desktop?
- A: Yes, for this setup method, Docker Desktop is essential. The
supabase start
command uses Docker to run all the different parts of the Supabase backend (the database, authentication service, etc.) in separate containers on your machine. Without Docker, the backend won't run.
- A: Yes, for this setup method, Docker Desktop is essential. The
-
Q: What's the difference between the
supabase start
andpnpm dev
commands?- A:
supabase start
(in one terminal) runs the actual Supabase backend services using Docker. This is your database, auth, etc.pnpm dev
(in another terminal) runs the frontend code for the Studio dashboard interface itself – the part you see and click on in your browser. The frontend talks to the backend.
- A:
-
Q: If I add data using the local Studio, will it show up in my project on supabase.com?
- A: No, they are completely separate! The local setup you just did runs entirely on your computer. It has its own database. Data you add locally stays local, and data in your hosted Supabase project stays online.
-
Q: Help! I ran into an error during setup. What should I do?
- A: Don't panic! First, double-check that you have all the prerequisites installed correctly (Git, Docker Desktop running, Node/pnpm, Supabase CLI). Look closely at the error message in your terminal – it often gives clues. You can also check the official Supabase documentation (the link we started with) or ask for help in the Supabase Discord community – they're super helpful!
-
Q: How do I update my local Studio code if Supabase releases new features?
- A: Good thinking! You'll need to pull the latest changes from GitHub and reinstall dependencies. Go to the
supabase/apps/studio
directory in your terminal and run:
Then you can rungit pull origin master # Get the latest code pnpm install # Install any new dependencies
pnpm dev
again. You might also need to update your Supabase CLI (npm update -g supabase
or similar) occasionally.
- A: Good thinking! You'll need to pull the latest changes from GitHub and reinstall dependencies. Go to the
Hope this helps answer some of your questions! Enjoy using Supabase locally!