---
# System prepended metadata

title: Deploy Medusa Admin on Gatsby Cloud
tags: [Heroku, Documentation, MedusaJS]

---

---
title: 'Deploy Medusa Admin on Gatsby Cloud'
disqus: hackmd
---

<p align="center">
  <a href="https://www.medusa-commerce.com">
    <img alt="Medusa" src="https://user-images.githubusercontent.com/7554214/129161578-19b83dc8-fac5-4520-bd48-53cba676edd2.png" width="100" />
  </a>
</p>
<h1 align="center">
  Deploy Medusa App on Gatsby Cloud
</h1>
<p align="center">
The following documentation will guide you through the creation of a new <a href="https://github.com/medusajs/medusa">Medusa</a> project hosted on Gatsby Cloud. Follow the steps below to get ready.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

## Table of Contents

[TOC]

## 1. Clone the Medusa Admin Repository 

```shell=
git clone https://github.com/medusajs/admin.git
mv admin my-medusa-admin
cd my-medusa-admin
```

## 2. Create a new `my-medusa-admin` repository on GitHub (or wherever you have your Medusa Admin repository)

```shell=
git remote set-url origin https://github.com/my-username/my-medusa-admin.git
git branch -M master
git push -u origin master
```

## 3. [Login to Gatsby Cloud](https://www.gatsbyjs.com/dashboard/login/)

Or [Sign up](https://www.gatsbyjs.com/dashboard/login)

## 4. Create a new site

1. Go on [https://www.gatsbyjs.com/dashboard](https://www.gatsbyjs.com/dashboard) and from "Sites" click "Add a site"
2. Select Import from a Git repository. Click "Next".
3.  Select GitHub (or wherever you have your Medusa Admin repository). Click "Next".
4. Select the repository you created at step 2. Click "Next".
5. Skip this step for now. Click "Skip this step".
6. From "Environment variables" set the Key=Value as:
```shell=
GATSBY_MEDUSA_BACKEND_URL=https://my-medusa-app.com/
GATSBY_STORE_URL=https://my-medusa-app.com/
```
7. Click "Create site"

## 5. Check your Medusa Admin endpoint 
Form [Dashboard](https://www.gatsbyjs.com/dashboard) "Sites" select your Medusa Admin site.
From "HOSTED ON GATSBY CLOUD" Select your Medusa Admin site url.

Something like `https://medusaadmin.gatsbyjs.io`

Copy it!

Add a new environment variables to your Medusa App Backend ➜ Add a new Key `ADMIN_CORS` with Value your Medusa Admin url

```shell=
ADMIN_CORS=https://your-medusa-admin-site.gatsbyjs.io
```


### Check Medusa Admin url!

![](https://i.imgur.com/VzsdOz8.png)



---

Visit [docs.medusa-commerce.com](https://docs.medusa-comerce.com) for further guides.

<p>
  <a href="https://www.medusa-commerce.com">
    Website
  </a> 
  |
  <a href="https://medusajs.notion.site/medusajs/Medusa-Home-3485f8605d834a07949b17d1a9f7eafd">
    Notion Home
  </a>
  |
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    Twitter
  </a>
  |
  <a href="https://docs.medusa-commerce.com">
    Docs
  </a>
</p>


:::info
**Find this document incomplete?** Leave a comment!
:::

###### tags: `MedusaJS` `Heroku` `Documentation`
