Deploy the Medusa Admin app to vercel
Prerequisites
To follow along with this tutorial you need the following:
A Medusa server with a working storage plugin. If not, you can follow this tutorial to get a server deployed on Amazon Web Services (AWS), and you can follow this documentation to use S3 for your storage.
The server needs to have its API ready to be consumed over HTTPS. This is because once you deploy your apps to Vercel, they will have by default a domain with an SSL certificate. If you try to make requests from them to a server without an SSL certificate, then you will get awarning in your browser and you won’t be able to fetch data from the API.mixed-content
A GitHub account and a newly created repository to be the monorepo.
A Vercel account.
Optionally you can install and use Yarn to follow along with this tutorial. You’ll still be able to follow along with this tutorial if you prefer using NPM.
Deploy the Admin Website
First, you’ll create the admin project. Click on the New Project button and you will be redirected to the new project screen. Then, you need to import your repository from GitHub. If you don’t have your GitHub account already linked to Vercel, click on Add GitHub Account and give the necessary permissions to Vercel so it can read your repositories.

Once Vercel can access your monorepo you should be able to import it. Click on Import.

On the next page, you’ll be asked to configure the project:
- Give a name to your project. For example,
medusa-admin
- For the Framework Preset choose
Gatsby.js
- For the root directory, click on edit and a popup will be shown with the folder structure of the monorepo. Choose thefolder and click on continue.
admin

Lastly, open Environment Variables and add an environment variable with the URL of your Medusa server:
GATSBY_MEDUSA_BACKEND_URL=<YOUR_MEDUSA_SERVER_URL>
Your configuration setup should look like this:

Once you’re done, click on Deploy. The deployment could take a while as Vercel will install all the dependencies, run the build command, and finally assign a new random domain for your app with an SSL certificate included.
Once your app is deployed you will be redirected to the overview page of the project you just created for your admin app. There, you can find the URL of your admin.

admin
ADMIN_CORS=<YOUR_ADMIN_URL>
Once the changes are saved and reflected on the Medusa server, you can go to the admin panel URL and you should see the login page.
Try to log in with your admin user credentials and you should be redirected to your admin dashboard.
If you seeded your server with dummy data on installation, you can use the emailand passwordadmin@medusa-test.com
.supersecret
