www/apps/cloud/app/projects/page.mdx
import { Prerequisites, InlineIcon, getOsShortcut, Kbd } from "docs-ui" import { ChevronUpDown } from "@medusajs/icons"
export const metadata = {
title: Create Projects and Deploy to Cloud,
}
In this guide, you'll learn about projects, how to create them, view their details, and manage their settings in Cloud.
A project is the collection of resources, environments, deployments, and settings related to a Medusa application deployed to the Cloud. The project is linked to a GitHub repository that hosts the Medusa application's code.
To deploy a Medusa application to the Cloud, you create a project for it. Medusa will automatically set up and configure the necessary resources in the project to run the application, such as PostgreSQL, Redis, and S3.
You can deploy either a Medusa application (server and admin dashboard) only, or a Medusa application along with a storefront.
Each project can have multiple environments, such as production and staging. These environments allow you to test changes before pushing them live to users. You can learn more in the Environments documentation.
If you've reached the limit of projects allowed in your organization's plan, you need to upgrade your plan to create more projects. Learn more in the Plans & Pricing guide.
</Note>In this section, you'll learn how to create a project in Cloud to deploy your Medusa application.
To create a project:
<Note title="Tip">You can also start the project creation flow from the command palette. Press <Kbd>{getOsShortcut()}</Kbd> + <Kbd>K</Kbd>, then select Create Project.
</Note>In the project-creation page, you can either create from a starter or create from an existing application.
Medusa provides you with the following starters that you can use to quickly set up your ecommerce application:
Both starters come with a pre-configured Medusa server, admin dashboard, and the Next.js Starter Storefront.
To create a project from either of these starters:
The repository will be cloned and you'll move forward to the Configure step.
If you already have a Medusa application, you can create a project from it.
Refer to the Prerequisites for Creating Projects guide to ensure your Medusa application meets the necessary prerequisites before deploying it to Cloud. This is especially necessary if you're deploying a storefront along with your Medusa application.
To create a project from an existing Medusa application:
You'll move forward to the Configure step.
After selecting the repository, you'll move on to the project configuration step. You can set the following information:
medusajs.app.
my-project, the project will be accessible at my-project.medusajs.app. Refer to the subdomain restrictions section for more details.my-project.medusajs.site.After creating the project, it will take a few minutes to create the necessary resources for it and deploy it. Once the deployment is complete, you'll be able to access the project from your organization's dashboard.
<Note>If the project creation takes too long, check out the troubleshooting section.
</Note>If you click on the project, you'll be taken to the project's dashboard, where you can view its details and status.
Once the project is created and deployed, you'll receive a notification in the Cloud dashboard. You can also view its status in the list of projects and in the project's details.
If you encounter any issues while creating a project, check common deployment issues and their solutions
Your backend's URL must be a subdomain of medusajs.app. For example, if you choose my-store as your subdomain, your project's URL will be my-store.medusajs.app.
When you choose a subdomain for your project, it must be at least five characters long. It also can't be one of the following reserved subdomains:
medusaadminstagingproductionpreviewdevelopmentproxyIf you also deployed a storefront with your Medusa application, its URL will be a subdomain of medusajs.site. For example, if your backend's subdomain is my-store, your storefront's URL will be my-store.medusajs.site. You can also add a custom domain, as explained in the Custom Domains guide.
Medusa supports hosting your Medusa projects on Cloud in the following regions:
us-east-1)eu-central-1)ap-southeast-1)All your project's deployments will be in the selected region. For better performance, choose a region that's closer to your target users. If you need to host your Medusa project in a different region, contact support.
To access the deployed project, you can navigate to:
Learn more in the Access Deployment guide.
To open a project's dashboard:
When you open a project's dashboard, its name will be shown at the top left next to the organization switcher.
On the project's dashboard, you can view the following details:
The project's name at the top left of the dashboard is also a project switcher.
To switch to a different project:
This will change the view to the selected project, and you'll see its details, environments, and settings.
To view the deployments of a project, click on the "Deployments" tab in the project's dashboard. This will show you a list of all deployments for the project, including their status, environment, and how long the deployment took.
Learn more in the Deployments guide.
If you initially created a project with only a Medusa application and later want to add a storefront to it, you can do it from the organization or project's dashboard.
Before adding a storefront, make sure you've changed your repository structure to a monorepo that includes both the Medusa application and storefront code. Learn how to create the monorepo in the Prerequisites for Creating Projects guide.
Then, to add a storefront to an existing project:
Cloud will then deploy the storefront along with the Medusa application. Once the deployment is complete, you'll be able to access the storefront from the Production environment card in the project's dashboard.
You can also set a custom domain for the storefront, as explained in the Custom Domains guide.
After creating a project, you can edit its general details, such as the project name and root directory in the repository, and manage its preview settings.
To edit a project's general details:
You can also edit the "Previews" settings of a project from the "Settings" tab, which are general settings related to Previews environments.
Learn more in the Preview Environments guide.
To delete a project: