Quickstart
Get a complete Medusa backend and admin dashboard running in under 5 minutes usingcreate-medusa-app.
Prerequisites
Node.js 20 or higher
Medusa requires Node.js version 20 or higher. Check your version:If needed, download from nodejs.org
PostgreSQL 13 or higher
Medusa uses PostgreSQL as its database. You can:
- Install locally from postgresql.org
- Use a hosted service like Neon, Supabase, or Railway
- Run via Docker:
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:13
Create Your Medusa Project
Run the create command
Execute the following command in your terminal:
The
create-medusa-app CLI is from package version 2.13.3 which scaffolds a complete Medusa project.Answer the prompts
The CLI will ask you several questions:Project name: Enter a name for your project (e.g.,
my-medusa-store)Database setup: Choose how to configure your PostgreSQL database:- Enter database URL (recommended if you have PostgreSQL running)
- Skip database setup (configure manually later)
Start Your Application
Once installation completes:Your First API Request
Test your Medusa API with a simple product list request:Project Structure
Your new Medusa project contains:Key Files
medusa-config.ts - Main configuration file:medusa-config.ts
.env
Available Scripts
Your Medusa project includes these npm scripts:Next Steps
Create Your First Product
Learn how to create products using the admin dashboard or API
Build a Custom API Route
Add custom endpoints to extend Medusa’s functionality
Create a Workflow
Compose complex business logic with the Workflow SDK
Install a Storefront
Connect a Next.js storefront to your Medusa backend
Common Issues
CLI Options Reference
Thecreate-medusa-app command supports these options:
| Option | Description | Default |
|---|---|---|
--seed | Seed database with demo data | false |
--skip-db | Skip database setup and migrations | false |
--db-url <url> | Use existing database at this URL | - |
--no-migrations | Skip running migrations | false |
--no-browser | Don’t open browser after setup | false |
--use-npm | Force npm as package manager | - |
--use-yarn | Force yarn as package manager | - |
--use-pnpm | Force pnpm as package manager | - |
--directory-path <path> | Install in specific directory | Current directory |
--repo-url <url> | Use custom repository template | Official template |
--verbose | Show all logs for debugging | false |
Example with Options
Get Help
If you’re stuck:- Check the installation guide for detailed setup instructions
- Ask in Discord
- Search GitHub Discussions
- Review GitHub Issues