Skip to main content

Medusa Admin Quickstart

This document will guide you through setting up the Medusa admin in minutes, as well as some of its features.

Prerequisites

The Medusa admin is connected to the Medusa server. So, make sure to install the Medusa server first before proceeding with the admin. You can check out the quickstart guide to install the Medusa server.

If you’re not very familiar with Medusa’s architecture, you can learn more about it in the Architecture Overview.

Instant Deployment to Netlify

Instead of manually following this guide to install then later deploy the Medusa Admin, you can deploy the Medusa Admin to Netlify with this button:

Deploy to Netlify

Install the Admin

Start by cloning the Admin GitHub repository and changing to the cloned directory:

Report Incorrect CodeReport Incorrect CodeReport Incorrect CodeCopy to Clipboard
git clone https://github.com/medusajs/admin medusa-admin
cd medusa-admin
Copy to Clipboard

Then, install the dependencies:

Report Incorrect CodeReport Incorrect CodeReport Incorrect CodeCopy to Clipboard
npm install
Copy to Clipboard

Test it Out

Before running your Medusa admin, make sure that your Medusa server is running.

To run your Medusa server, go to the directory holding the server and run:

npm run start
Copy to Clipboard

Then, in the directory holding your Medusa admin, run the following to start the development server:

Report Incorrect CodeReport Incorrect CodeReport Incorrect CodeCopy to Clipboard
npm run start
Copy to Clipboard

By default, the admin runs on port 7000. So, in your browser, go to Copy to Clipboard to view your admin.

Admin Log In

Use your Medusa admin’s user credentials to log in.

If you installed the demo data when you installed the Medusa server by using the Copy to Clipboard option or running:

npm run seed
Copy to Clipboard

You can use the email Copy to Clipboard and password Copy to Clipboard to log in.

Create a New Admin User

To create a new admin user from the command line, run the following command in the directory holding your Medusa server:

Report Incorrect CodeReport Incorrect CodeReport Incorrect CodeCopy to Clipboard
medusa user -e some@email.com -p some-password
Copy to Clipboard

This will create a new user that you can use to log into your admin panel.

Changing the Default Port

The default port is set in Copy to Clipboard in the Copy to Clipboard script:

Report Incorrect CodeReport Incorrect CodeReport Incorrect CodeCopy to Clipboard
"develop": "gatsby develop -p 7000",
Copy to Clipboard

If you wish to change the port you can simply change the Copy to Clipboard to your desired port.

However, if you change your Medusa admin port, you need to change it in your Medusa server. The Medusa server has the Medusa admin and store URLs set in the configurations to avoid Cross-Origin Resource Sharing (CORS) issues.

To change the URL of the Medusa admin in the server, add a new environment variable Copy to Clipboard or modify it if you already have it to your Admin URL:

Report Incorrect CodeReport Incorrect CodeReport Incorrect CodeCopy to Clipboard
ADMIN_CORS=<YOUR_ADMIN_URL>
Copy to Clipboard

Make sure to replace Copy to Clipboard with your URL.

For more details about the Admin CORS configuration, check out the Configure your Server documentation.

Admin User Guide

Medusa admin provides a lot of ecommerce features including managing Return Merchandise Authorization (RMA) flows, store settings, products, orders, and much more.

You can learn more about Medusa admin and its features in the User Guide.

What’s Next