How to Run your Medusajs 2.0 boilerplate locally
Learn how to run your MedusaJS 2.0 boilerplate locally with this step-by-step guide. Set up essential tools like Git, VS Code, and Node.js, and configure your environment for local development. Perfect for customizing your Medusa project beyond the one-click deploy setup!
Requirements
Until now, everything has been done in your browser, but that is about to change. To make changes to your medusa project, you will need some web development tools. If you already have these tools, please scroll past this step. If you have never heard of any of these tools, you're in for a challenge, as this will get quite technical.
- Medusajs 2.0 boilerplate project: If you didn't already launch the one-click deploy template, you will need to do that first, it takes about 10 minutes, instructions can be found here: https://funkyton.com/medusajs-2-0-is-finally-here/#video-instrucitons
- Git: A command-line tool necessary for pushing your updates to the build pipeline. You can download Git from Git's official website. Choose the version compatible with your operating system and follow the installation instructions.
- Visual Studio Code (VS Code): VS Code is a lightweight, yet powerful and free code editor developed by Microsoft. Download it from the official Visual Studio Code website. Select the version for your operating system.
- Node.js: Node.js is a runtime environment that allows you to run JavaScript on the server side. It's required to execute the JavaScript code you'll be working with. Visit the official Node.js website to download. It is recommended to download the LTS (Long Term Support) version for better stability.
Video Instructions
Setup
In case you don't already have the .env.local template file in your /storefront, you may copy the contents here:
NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://localhost:9000
NEXT_PUBLIC_BASE_URL=http://localhost:8000NEW! Docker Compose support (July 2026)
The boilerplate now ships with a docker-compose.yml in the repository root that spins up the same services you get on Railway; Postgres, Redis, MeiliSearch, and an S3-compatible storage bucket (MinIO) so you can run the full stack locally with one command:
docker compose up -d
That's it. A small init job even creates the medusa-media bucket for you and makes it publicly readable, so product images work locally out of the box.
To connect your backend to these services, open backend/.env and uncomment the S3_* and MEILISEARCH_* values in .env.template they already match the docker-compose setup exactly. The default DATABASE_URL and REDIS_URL values match too. Then run the backend and storefront as usual:
cd backend && pnpm ib && pnpm dev # backend on localhost:9000
cd storefront && pnpm dev # storefront on localhost:8000
A few handy URLs while developing:
- MeiliSearch dashboard: http://localhost:7700 (key:
local_meilisearch_master_key) - MinIO console: http://localhost:9005 (login:
medusa/supersecret)
Everything runs in named volumes, so your data survives restarts. docker compose stop pauses the stack, docker compose down -v wipes it for a fresh start.
Before this, testing things like search and file uploads locally meant connecting to your cloud services or setting each one up by hand, now the whole Railway-like environment lives on your machine. 🎉