8.3. Medusa Deployment Overview
In this chapter, you’ll learn the general approach to deploying the Medusa application.
Want Medusa to manage and maintain your infrastructure? Sign up and learn more about Cloud
Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Cloud hosts your server, Admin dashboard, storefront, database, and Redis instance.
With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
- Push to deploy.
- Multiple testing environments.
- Preview environments for new PRs.
- Test on production-like data.
- Storefront deployment.
- Emails setup.
- And more.
Medusa Project Components#
A standard Medusa project is made up of:
- Medusa application: The Medusa server and the Medusa Admin.
- One or more storefronts

On Cloud, you can deploy the Medusa application and the storefront together in the same project. When you self-host, you deploy the Medusa application, with the server and admin, separately from the storefront.
Deploying the Medusa Application#
You must deploy the Medusa application before the storefront, as it connects to the server and won’t work without a deployed Medusa server URL.
When you self-host, you must deploy the Medusa application to a hosting provider that supports Node.js server deployments.

Your server connects to a PostgreSQL database, Redis, and other services relevant for your setup. Cloud provisions and manages these for you. If you self-host, most hosting providers support deploying and managing these databases along with your Medusa server.
When you deploy your Medusa application, you also deploy the Medusa Admin. If you self-host, your hosting provider and plan must offer at least 2GB of RAM for optimal experience.
Deploy Server and Worker Instances#
By default, Medusa runs all processes in a single instance. This includes the server that handles incoming requests and the worker that processes background tasks. While this works for development, it’s not optimal for production environments as many background tasks can be long-running or resource-heavy.
Instead, you should deploy two instances:
- A server instance, which handles incoming requests to the application’s API routes.
- A worker instance, which processes background tasks, including scheduled jobs and subscribers.
Cloud creates both instances for you. If you self-host, you don’t need to set up different projects for each instance. Instead, you can configure the Medusa application to run in different modes based on environment variables.
Learn more about worker modes and how to configure them in the Worker Mode chapter.
How to Deploy Medusa?#
The recommended way to deploy Medusa is Cloud. You connect your GitHub repository to a Cloud project, and Medusa deploys every commit you push, without you configuring, scaling, or maintaining infrastructure.
The next chapter explains the steps to deploy your Medusa application to Cloud, and the general steps to self-host it if you choose to.
Deploying the Storefront#
Cloud supports deploying your storefront alongside your Medusa application, simplifying the backend and frontend hosting for you. You can also benefit from preview environments for testing changes before they go live, Medusa Security, custom domains, and more.
Learn more about deploying your storefront to Cloud in the Storefront documentation.
If you choose to self-host Medusa, the storefront is deployed separately from the Medusa application, and the hosting options depend on the tools and frameworks you use to create the storefront.