diff --git a/www/apps/book/app/learn/build/page.mdx b/www/apps/book/app/learn/build/page.mdx index 7c2ae2bc6d..76ca5c2376 100644 --- a/www/apps/book/app/learn/build/page.mdx +++ b/www/apps/book/app/learn/build/page.mdx @@ -8,6 +8,12 @@ In this chapter, you'll learn how to create a production build of your Medusa ap Next chapters explain how to deploy the Medusa application. + + +The below instructions are useful for self-hosting your Medusa application. You can also use [Cloud](!cloud!) to deploy and manage your Medusa application without worrying about infrastructure. Medusa will handle the configurations, deployment, and scaling for you. + + + ## build Command The Medusa CLI tool provides a [build](!resources!/medusa-cli/commands/build) command that creates a standalone build of the Medusa application that: @@ -117,5 +123,3 @@ Make sure to remove the `projectConfig.cookieOptions` configuration once you're ## Deploying Production Build The next chapter covers how to deploy the production build. - -You can also refer to the [deployment how-to guides](!resources!/deployment) for platform-specific deployment instructions. diff --git a/www/apps/book/app/learn/deployment/general/page.mdx b/www/apps/book/app/learn/deployment/general/page.mdx index 7915af319e..b6aff15dbb 100644 --- a/www/apps/book/app/learn/deployment/general/page.mdx +++ b/www/apps/book/app/learn/deployment/general/page.mdx @@ -6,17 +6,13 @@ export const metadata = { # {metadata.title} -In this document, you'll learn the general steps to deploy your Medusa application. How you apply these steps depend on your chosen hosting provider or platform. - -Find how-to guides for specific platforms in [this documentation](!resources!/deployment). +In this guide, you'll learn the general steps to deploy your Medusa application. How you apply these steps depend on your chosen hosting provider or platform. -Want Medusa to manage and maintain your infrastructure? [Sign up and learn more about Cloud](!cloud!) +Before deciding to self-host your Medusa application, consider reading the [Cloud vs. Self-Hosting comparison guide](!cloud!/comparison). By using Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance. -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, database, and Redis instance. - -With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub: +With Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub: - Push to deploy. - Multiple testing environments. diff --git a/www/apps/book/app/learn/deployment/page.mdx b/www/apps/book/app/learn/deployment/page.mdx index 56021b2f17..ac151eb30d 100644 --- a/www/apps/book/app/learn/deployment/page.mdx +++ b/www/apps/book/app/learn/deployment/page.mdx @@ -6,6 +6,21 @@ export const metadata = { 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!) + +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, 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. + + + ## Medusa Project Components A standard Medusa project is made up of: @@ -23,11 +38,11 @@ You deploy the Medusa application, with the server and admin, separately from th 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. -The Medusa application must be deployed to a hosting provider supporting Node.js server deployments, such as Railway, DigitalOcean, AWS, Heroku, etc… +The Medusa application must be deployed to a hosting provider supporting Node.js server deployments. ![Medusa server deployment infrastructure diagram illustrating the backend services ecosystem: the Node.js Medusa server connected to essential services including PostgreSQL database for data storage, and Redis for caching and session management](https://res.cloudinary.com/dza7lstvk/image/upload/v1708600972/Medusa%20Book/backend_deployment_pgexo3.jpg) -Your server connects to a PostgreSQL database, Redis, and other services relevant for your setup. Most hosting providers support deploying and managing these databases along with your Medusa server (such as Railway and DigitalOcean). +Your server connects to a PostgreSQL database, Redis, and other services relevant for your setup. 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. For optimal experience, your hosting provider and plan must offer at least 2GB of RAM. diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 65b445e1b3..9f9ea30100 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -1,7 +1,7 @@ export const generatedEditDates = { "app/learn/fundamentals/scheduled-jobs/page.mdx": "2025-07-25T15:56:17.926Z", "app/learn/fundamentals/workflows/page.mdx": "2024-12-09T14:45:17.837Z", - "app/learn/deployment/page.mdx": "2025-07-18T15:25:33.249Z", + "app/learn/deployment/page.mdx": "2025-09-29T10:25:29.915Z", "app/learn/page.mdx": "2025-06-27T11:39:15.941Z", "app/learn/fundamentals/modules/commerce-modules/page.mdx": "2025-04-17T08:51:32.723Z", "app/learn/fundamentals/workflows/retry-failed-steps/page.mdx": "2025-09-15T09:38:18.299Z", @@ -93,8 +93,8 @@ export const generatedEditDates = { "app/learn/fundamentals/data-models/infer-type/page.mdx": "2025-03-18T07:41:01.936Z", "app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx": "2025-09-15T16:02:51.362Z", "app/learn/fundamentals/environment-variables/page.mdx": "2025-05-26T15:06:07.800Z", - "app/learn/build/page.mdx": "2025-09-30T06:10:46.850Z", - "app/learn/deployment/general/page.mdx": "2025-09-01T06:21:43.760Z", + "app/learn/build/page.mdx": "2025-09-30T06:14:50.101Z", + "app/learn/deployment/general/page.mdx": "2025-09-29T10:21:24.768Z", "app/learn/fundamentals/workflows/multiple-step-usage/page.mdx": "2025-08-01T14:59:59.501Z", "app/learn/installation/page.mdx": "2025-07-23T14:28:50.404Z", "app/learn/fundamentals/data-models/check-constraints/page.mdx": "2025-07-25T13:50:21.065Z", diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index e3c9aa837a..079360e50d 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -6,6 +6,8 @@ In this chapter, you'll learn how to create a production build of your Medusa ap Next chapters explain how to deploy the Medusa application. +The below instructions are useful for self-hosting your Medusa application. You can also use [Cloud](https://docs.medusajs.com/cloud/index.html.md) to deploy and manage your Medusa application without worrying about infrastructure. Medusa will handle the configurations, deployment, and scaling for you. + ## build Command The Medusa CLI tool provides a [build](https://docs.medusajs.com/resources/medusa-cli/commands/build/index.html.md) command that creates a standalone build of the Medusa application that: @@ -104,8 +106,6 @@ Make sure to remove the `projectConfig.cookieOptions` configuration once you're The next chapter covers how to deploy the production build. -You can also refer to the [deployment how-to guides](https://docs.medusajs.com/resources/deployment/index.html.md) for platform-specific deployment instructions. - # Medusa Application Configuration @@ -6080,15 +6080,11 @@ The next chapters explain how to use the testing tools provided by `@medusajs/te # General Medusa Application Deployment Guide -In this document, you'll learn the general steps to deploy your Medusa application. How you apply these steps depend on your chosen hosting provider or platform. +In this guide, you'll learn the general steps to deploy your Medusa application. How you apply these steps depend on your chosen hosting provider or platform. -Find how-to guides for specific platforms in [this documentation](https://docs.medusajs.com/resources/deployment/index.html.md). +Before deciding to self-host your Medusa application, consider reading the [Cloud vs. Self-Hosting comparison guide](https://docs.medusajs.com/cloud/comparison/index.html.md). By using Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance. -Want Medusa to manage and maintain your infrastructure? [Sign up and learn more about Cloud](https://docs.medusajs.com/cloud/index.html.md) - -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, database, and Redis instance. - -With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub: +With Cloud, you also maintain full customization control as you deploy your own modules and customizations directly from GitHub: - Push to deploy. - Multiple testing environments. @@ -6408,6 +6404,17 @@ You can use these credentials to log into the Medusa Admin dashboard. 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](https://docs.medusajs.com/cloud/index.html.md) + +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, 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. + ## Medusa Project Components A standard Medusa project is made up of: @@ -6425,11 +6432,11 @@ You deploy the Medusa application, with the server and admin, separately from th 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. -The Medusa application must be deployed to a hosting provider supporting Node.js server deployments, such as Railway, DigitalOcean, AWS, Heroku, etc… +The Medusa application must be deployed to a hosting provider supporting Node.js server deployments. ![Medusa server deployment infrastructure diagram illustrating the backend services ecosystem: the Node.js Medusa server connected to essential services including PostgreSQL database for data storage, and Redis for caching and session management](https://res.cloudinary.com/dza7lstvk/image/upload/v1708600972/Medusa%20Book/backend_deployment_pgexo3.jpg) -Your server connects to a PostgreSQL database, Redis, and other services relevant for your setup. Most hosting providers support deploying and managing these databases along with your Medusa server (such as Railway and DigitalOcean). +Your server connects to a PostgreSQL database, Redis, and other services relevant for your setup. 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. For optimal experience, your hosting provider and plan must offer at least 2GB of RAM. diff --git a/www/apps/cloud/app/comparison/page.mdx b/www/apps/cloud/app/comparison/page.mdx new file mode 100644 index 0000000000..beccec0721 --- /dev/null +++ b/www/apps/cloud/app/comparison/page.mdx @@ -0,0 +1,322 @@ +import { Table } from "docs-ui" + +export const metadata = { + title: `Cloud vs Self-Hosting`, +} + +# {metadata.title} + +In this guide, you'll learn about the main differences between hosting your Medusa application on Cloud and self-hosting it. By the end of this guide, you'll be able to make an informed decision about which option is best for your use case. + +## What is Self-Hosting? + +Self-hosting means deploying and managing your Medusa application on your own infrastructure or a hosting provider of your choice, such as AWS, Railway, or DigitalOcean. + +Developers with infrastructure management experience may consider self-hosting their Medusa application to have greater control over their deployment environment and potentially reduce costs. + +However, before choosing self-hosting, it's important to understand the challenges that come with it, the efforts it requires, and whether Cloud can provide a better solution for your needs. + +--- + +## Summary + + + + + + Concern + + + Self-Hosting + + + Cloud + + + + + + + [Code Ownership](#code-ownership) + + + You own and manage your Medusa application code. + + + You own and manage your Medusa application code. + + + + + [Configurations](#configurations) + + + Requires manual configuration of servers, databases, and other services. + + + Provides pre-configured environments, reducing setup time. + + + + + [Deployment & Production Readiness](#deployment--production-readiness) + + + Requires complex setup of the deployment environment and ensuring production readiness. + + + Provides automated deployment and scaling, making it easier to manage production environments. + + + + + [Auto-Scaling](#auto-scaling) + + + Requires manual setup and management of scaling policies and infrastructure. + + + Automatically scales based on traffic, ensuring optimal performance. + + + + + [High-Availability](#high-availability) + + + Requires manual setup and management of redundancy and failover mechanisms. + + + Provides real-time monitoring and failover mechanisms to ensure high availability. + + + + + [Performance](#performance) + + + Requires manual optimization and monitoring to ensure optimal performance. + + + Provides continuous performance monitoring and optimization. + + + + + [Developer Experience](#developer-experience) + + + Limited developer experience due to the lack of features like code previews and staging environments. + + + Offers GitHub integration, preview and staging environments, and push-to-deploy features, enhancing developer experience and productivity. + + + + + [Data Backup](#data-backup) + + + Requires manual setup of reliable data backup and recovery processes. + + + Provides automated backups and recovery options based on your plan. + + + + + [Support](#support) + + + Relies on community support and documentation. + + + Offers dedicated support, ensuring timely assistance. + + + + + [Cost](#cost) + + + Costs will vary based on your chosen infrastructure and usage patterns. + + + Competitive pricing model with transparent plans. + + + +
+ +--- + +## Code Ownership + +Both self-hosting and Cloud allow you to own and manage your Medusa application codebase. + +When you deploy your Medusa application on Cloud, you deploy it from your own GitHub repository. The code remains entirely yours. Cloud only manages the deployment and hosting of your application. + +--- + +## Configurations + +### Self-Hosting: Manual Configurations + +When you **self-host**, you must manually configure the server for production. You also need to configure database connections, event services, locking mechanisms, and other [Infrastructure Modules](!resources!/infrastructure-modules) that your Medusa application may use. + +There may also be platform-specific configurations, adding another layer of complexity that will slow down your time to launch. You'll also need to maintain these configurations over time as Medusa updates are released. + +### Cloud: Pre-configured Environments + +On **Cloud**, Medusa offers: + +- Pre-configured environments optimized for Medusa applications with no configuration required on your end. +- Automated setup and management of infrastructure components. +- Integrated services like [PostgreSQL](../database/page.mdx), [Redis](../redis/page.mdx), and [S3](../s3/page.mdx). + +All of these features are available out-of-the-box in your Cloud projects. By using Cloud, you can reduce the time and effort required to get your application up and running, allowing you to focus on building and shipping features. + +--- + +## Deployment & Production Readiness + +### Self-Hosting: Complex and Time-Consuming Setup + +When you **self-host**, you need to manually set up the production environment, including scaling, monitoring, and logging. You'll need to build deployment pipelines and processes to ensure smooth deployments and rollbacks. + +Additionally, your self-hosted environment must be production-ready with best security practices, performance optimizations, and high-availability configurations. + +Supporting this setup requires extensive knowledge of infrastructure management. You must also dedicate time and resources to maintain the infrastructure. + +### Cloud: Automated Deployment + +On **Cloud**, Medusa manages your deployment environment and ensures it's optimized for production. Medusa: + +- Handles scaling automatically based on your traffic. More information in the [Auto-Scaling](#auto-scaling) section. +- Rolls out your code updates with zero downtime, ensuring a smooth experience for your users. +- Provides [logging](../logs/page.mdx) features to track your application's performance without additional setup. + +--- + +## Auto-Scaling + +### Self-Hosting: Manual Setup and Management + +Auto-scaling is essential to maintain performance and availability during high traffic periods, such as sales or promotions. + +When you **self-host**, you must set up and manage scaling policies and infrastructure manually. You must configure load balancers, auto-scaling groups, and monitoring tools to ensure your application can handle traffic spikes. + +If not set up correctly, your application may experience performance degradation or downtime during high traffic periods. + +### Cloud: Automatic Scaling + +On **Cloud**, Medusa automatically scales your application based on traffic. This ensures optimal performance without manual intervention. + +Medusa adjusts the number of instances running your application based on demand, ensuring your users have a seamless experience even during traffic spikes. You don't need to configure or manage any scaling policies or infrastructure, as Medusa handles everything for you. + +--- + +## High-Availability + +### Self-Hosting: Risk of Downtime + +When you **self-host**, you are responsible for setting up and managing redundancy and failover mechanisms to ensure high availability. You must monitor your application's health and respond to incidents manually. + +If your infrastructure fails and you don't have proper failover mechanisms in place, your application may experience downtime, leading to a poor user experience. + +### Cloud: Highly Reliable with 24/7 Monitoring + +Medusa provides high-availability features on **Cloud** to ensure your application remains online and responsive. Medusa: + +- Monitors your application's health 24/7 and automatically responds to incidents. +- Implements failover mechanisms to minimize downtime and ensures your application is always available. +- Offers [SLA-backed response and uptime](../pricing/page.mdx) based on your plan to guarantee your application's availability. + +By using Cloud, you can focus on building your application without worrying about downtime or availability issues. + +--- + +## Performance + +### Self-Hosting: Manual Optimization + +When you **self-host**, you are responsible for optimizing and monitoring your application's performance. You must configure caching mechanisms, database optimizations, and other performance-enhancing techniques. + +If not optimized correctly, your application may experience slow response times, leading to a poor user experience. + +### Cloud: Continuous Performance Monitoring + +Medusa provides continuous performance monitoring and optimization on **Cloud**. Medusa continuously monitors applications to identify performance bottlenecks and build tooling to resolve them. + +Cloud users benefit from these optimizations without any additional effort or configuration, ensuring their applications run smoothly and efficiently. + +--- + +## Developer Experience + +### Self-Hosting: Slower Developer Experience + +When you **self-host**, you may miss out on features like code previews and push-to-deploy, making it difficult to review and ship changes quickly. You'll also find it challenging to reproduce production issues, as you'll need to set up staging environments manually, adding to the complexity. + +### Cloud: Enhanced Developer Experience + +Medusa enhances the developer experience on **Cloud** by providing features like: + +- GitHub integration for [push-to-deploy](../deployments/page.mdx#how-are-deployments-created). +- [Preview environments](../environments/preview/page.mdx) to test changes in pull requests before merging. +- [Staging environments](../environments/page.mdx) to test new features and reproduce issues in a production-like setting. + +By using Cloud, you streamline your development workflow and reduce the time and effort required to manage and ship features. + +--- + +## Data Backup + +### Self-Hosting: Risky if Not Done Properly + +When you **self-host**, you need to set up data backup and recovery processes manually. This includes scheduling regular backups, storing them securely, and testing recovery procedures. Failing to implement a robust backup strategy can lead to data loss in the event of errors or disasters. + +### Cloud: Automated Backups and Recovery + +Medusa provides automated backups and recovery options on **Cloud** based on your [plan](../pricing/page.mdx). Backups are performed reliably and stored securely, reducing the risk of data loss. You can restore your data if needed without affecting your application's availability. + +--- + +## Support + +### Self-Hosting: Community Support + +When you **self-host**, you rely on community support and documentation for assistance. While the Medusa community is active and helpful, you may not receive timely responses to critical issues or answers that are specific to your business use case. Limited support may slow down your development and affect your application's reliability. + +### Cloud: Dedicated Support + +Medusa offers dedicated [support](https://medusajs.com/medusa-support/) options for **Cloud** users based on their [plan](../pricing/page.mdx). You receive timely assistance to help resolve issues, upgrade your application, and improve performance. Medusa provides the necessary resources to maintain and grow your application. + +--- + +## Cost + +### Self-Hosting: Variable Costs + +When you **self-host**, your costs vary based on your chosen infrastructure and usage patterns. At minimum, you'll need server and worker instances, a PostgreSQL database, and a Redis instance. You'll likely need additional services like S3 for file storage or monitoring tools. + +Depending on your traffic and usage, costs can add up quickly, especially if the infrastructure isn't optimized for cost efficiency. + +### Cloud: Cost-Competitive Pricing + +Medusa offers a cost-competitive pricing model on **Cloud** compared to self-hosting. You can choose a [plan](../pricing/page.mdx) that fits your needs and budget, with the flexibility to scale as your application grows. + +--- + +## Get Started with Cloud + +[Sign Up](../sign-up/page.mdx) on Cloud to get started and deploy your first application in minutes. + +### Migrate in Two Steps + +If you have an existing self-hosted Medusa application, you can migrate it to Cloud by: + +1. [Creating a project](../projects/page.mdx) and connecting it to your existing GitHub repository. +2. [Importing your production database](../database/page.mdx#importexport-database-dumps) to Cloud. + +You'll then have a fully managed Medusa application deployed on Cloud, with all the benefits mentioned above, including automated deployment, scaling, and enhanced developer experience. \ No newline at end of file diff --git a/www/apps/cloud/app/organizations/page.mdx b/www/apps/cloud/app/organizations/page.mdx index e2f4256600..fa4612fd62 100644 --- a/www/apps/cloud/app/organizations/page.mdx +++ b/www/apps/cloud/app/organizations/page.mdx @@ -15,9 +15,25 @@ In Cloud, an organization is a group of users that have access to the same setti As a user, you must be in an organization to create and deploy projects. A user can be a member of multiple organizations. -You can create a new organization when you sign up for Cloud. This will make you the organization's owner. +--- -You can also join an existing organization by [receiving an invite from a user in that organization](#invite-members-to-organization). +## Create or Join an Organization + +To get started with Cloud, you need to either create a new organization or [join an existing one](#invite-members-to-organization). + +If you don't have a Cloud account, you can [sign up for Cloud](../sign-up/page.mdx) and create a new organization. + +To create a new organization when you already have a Cloud account: + +1. Click on the icon next to the current organization name at the top left of the Cloud dashboard. +2. Choose "Create Organization" from the dropdown. +3. In the "Setup your organization" step, enter your organization's name and click the "Create" button. +4. In the final step: + - Choose a plan for your organization. By default, the **Hobby** plan is selected. You can change the plan by clicking the "Change plan" link. + - **Payment Details**: Enter your card details. You'll be charged upfront based on the plan you selected once you finish the setup. + - **Billing details**: If you chose the **Pro** plan, enter your billing details, including your legal name and billing email address. These details are used for taxes and invoicing. + - **Billing address**: Enter your billing address. This address is used for generated invoices. +5. Once you're done, click the "Start your X/mo plan" button. Then, Medusa will charge you for the plan you selected, create an organization, and redirect you to your organization's Cloud dashboard. --- diff --git a/www/apps/cloud/app/page.mdx b/www/apps/cloud/app/page.mdx index a5a9b8e424..5b71e81142 100644 --- a/www/apps/cloud/app/page.mdx +++ b/www/apps/cloud/app/page.mdx @@ -12,7 +12,7 @@ In this guide, you'll learn about Cloud and its features. ## Sign Up for Cloud -Go to [medusajs.com/pricing](https://medusajs.com/pricing/) to learn more about the Cloud plans. +Refer to the [Sign Up for Cloud](./sign-up/page.mdx) guide to get started. --- diff --git a/www/apps/cloud/app/sign-up/page.mdx b/www/apps/cloud/app/sign-up/page.mdx new file mode 100644 index 0000000000..6d226a3b94 --- /dev/null +++ b/www/apps/cloud/app/sign-up/page.mdx @@ -0,0 +1,101 @@ +export const metadata = { + title: `Sign Up for Cloud`, +} + +# {metadata.title} + +In this guide, you'll learn how to sign up for Cloud. You'll create an organization, choose a plan, and set up billing. + +After creating an organization, you can start deploying your Medusa applications on Cloud. + + + +If you already have a Cloud account and you want to create a new organization, refer to the [Create an Organization](../organizations/page.mdx#create-or-join-an-organization) guide instead. + + + +## Step 1: Create a Cloud Account + +To sign up for Cloud, go to [cloud.medusajs.com/signup](https://cloud.medusajs.com/signup). + +On this page, you can choose to either sign up with your GitHub account or with your email address. + +![Sign up page with GitHub and email options](https://res.cloudinary.com/dza7lstvk/image/upload/v1757581724/Cloud/CleanShot_2025-09-11_at_12.08.08_2x_e6md6c.png) + +--- + +## Step 2: Set Up Your Account + +In the next step, you need to enter your account details. These details will be used for your organization as well. + +Enter the following details: + +- **What should we call you?**: Enter your full name. + - This name will be used as the organization's name. You can change the organization name later in the [organization settings](../organizations/page.mdx#edit-organization-details). +- **Where did you hear about Medusa?**: Select an option from the dropdown menu. This helps us understand how users find out about Medusa. +- **What are you building?**: Select an option from the dropdown menu. This helps us understand what users are building with Medusa. If you don't see an option that fits your use case, select "Other" and provide more details in the text box that appears. +- **News and features**: Keep the switch enabled to receive updates about Medusa, including new features, improvements, and other news. You can disable this option if you prefer not to receive such updates. + +Once you're done, click the **Continue** button to proceed to the next step. + +![Account details form with name, referral, use case, and newsletter options](https://res.cloudinary.com/dza7lstvk/image/upload/v1757581945/Cloud/CleanShot_2025-09-11_at_12.12.16_2x_t86r6j.png) + +--- + +## Step 3: Set up Payment and Billing + +In the last step, you need to choose a plan, enter your payment details, and set up billing details. + +### Choose a Plan + +By default, the **Hobby** plan is selected. This plan is minimal and allows you to deploy a single Medusa application that is suitable for development and testing purposes. + +To change the plan, click on the **Change plan** link. This will open a modal where you can select a different plan. + + + +Learn about the different plans and their features in the [Plans guide](../pricing/page.mdx). + + + +![Plan section with the Hobby plan selected](https://res.cloudinary.com/dza7lstvk/image/upload/v1757582162/Cloud/CleanShot_2025-09-11_at_12.15.39_2x_ww4ff2.png) + +### Enter Payment Details + +Next, you need to enter your card details. This is required for all plans. + +Once you finish the sign-up, you will be charged upfront for the first month based on the plan you selected. You can learn more about this in the [Billing guide](../billing/page.mdx). + +![Payment details form with card number, expiry date, and CVC fields](https://res.cloudinary.com/dza7lstvk/image/upload/v1757582477/Cloud/CleanShot_2025-09-11_at_12.20.06_2x_lzk7gu.png) + +### Pro Plan: Billing Details + +If you chose the **Pro** plan, you need to enter your billing details that are used for tax purposes. + +Enter your legal name and billing email address in this section. + +![Billing details form with legal name and billing email fields](https://res.cloudinary.com/dza7lstvk/image/upload/v1757582477/Cloud/CleanShot_2025-09-11_at_12.19.53_2x_dxfziq.png) + +### Billing Address + +Finally, enter your billing address. This is required for all plans. + +Your billing address will be used for your invoices. + +![Billing address form with country, address, city, state, and postal code fields](https://res.cloudinary.com/dza7lstvk/image/upload/v1757582478/Cloud/CleanShot_2025-09-11_at_12.20.55_2x_un3emk.png) + +### Complete the Sign-Up + +Once you're done, click the "Start your X/mo plan" button to complete the sign-up process. The button text will vary based on the plan you selected. + +At this point, Medusa will charge your card for the first month based on the plan you selected, and you will be redirected to your organization's Cloud dashboard. + +--- + +## Next Steps + +Now that you have signed up for Cloud, you can: + +- [Create projects](../projects/page.mdx) to deploy your Medusa applications. +- [Manage your organization](../organizations/page.mdx) settings, including inviting team members. +- [Change your plan](../billing/page.mdx#change-your-organizations-plan) or update your payment details. diff --git a/www/apps/cloud/generated/edit-dates.mjs b/www/apps/cloud/generated/edit-dates.mjs index 70d86afb3e..1e8871a4b5 100644 --- a/www/apps/cloud/generated/edit-dates.mjs +++ b/www/apps/cloud/generated/edit-dates.mjs @@ -1,10 +1,10 @@ export const generatedEditDates = { - "app/page.mdx": "2025-09-11T11:20:20.775Z", + "app/page.mdx": "2025-09-11T15:21:38.987Z", "app/organization/page.mdx": "2025-06-12T14:43:20.772Z", "app/projects/page.mdx": "2025-09-29T12:03:35.689Z", "app/environments/page.mdx": "2025-06-25T08:00:05.550Z", "app/deployments/page.mdx": "2025-06-25T07:57:13.059Z", - "app/organizations/page.mdx": "2025-09-11T14:26:31.848Z", + "app/organizations/page.mdx": "2025-09-11T15:21:38.987Z", "app/notifications/page.mdx": "2025-06-25T07:27:37.642Z", "app/database/page.mdx": "2025-08-15T15:30:37.814Z", "app/redis/page.mdx": "2025-06-25T07:57:23.246Z", @@ -20,5 +20,7 @@ export const generatedEditDates = { "app/billing/page.mdx": "2025-09-04T15:25:50.586Z", "app/usage/page.mdx": "2025-08-25T07:25:54.703Z", "app/billing/manage/page.mdx": "2025-09-04T14:50:46.747Z", - "app/pricing/page.mdx": "2025-09-05T10:31:59.059Z" + "app/pricing/page.mdx": "2025-09-05T10:31:59.059Z", + "app/sign-up/page.mdx": "2025-09-29T10:16:20.885Z", + "app/comparison/page.mdx": "2025-09-30T06:17:40.257Z" } \ No newline at end of file diff --git a/www/apps/cloud/generated/sidebar.mjs b/www/apps/cloud/generated/sidebar.mjs index 6eacafeb7c..4b93bfca15 100644 --- a/www/apps/cloud/generated/sidebar.mjs +++ b/www/apps/cloud/generated/sidebar.mjs @@ -18,6 +18,14 @@ export const generatedSidebars = [ "title": "Introduction", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/sign-up", + "title": "Sign Up", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -25,6 +33,14 @@ export const generatedSidebars = [ "path": "/faq", "title": "FAQ", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/comparison", + "title": "Cloud vs Self Hosting", + "children": [] } ] }, diff --git a/www/apps/cloud/sidebar.mjs b/www/apps/cloud/sidebar.mjs index fa0a2b4d64..4dd61fd691 100644 --- a/www/apps/cloud/sidebar.mjs +++ b/www/apps/cloud/sidebar.mjs @@ -14,11 +14,21 @@ export const sidebar = [ path: "/", title: "Introduction", }, + { + type: "link", + path: "/sign-up", + title: "Sign Up", + }, { type: "link", path: "/faq", title: "FAQ", }, + { + type: "link", + path: "/comparison", + title: "Cloud vs Self Hosting", + }, ], }, { diff --git a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx deleted file mode 100644 index 23d47206a3..0000000000 --- a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx +++ /dev/null @@ -1,424 +0,0 @@ ---- -sidebar_label: "Railway" ---- - -import { Prerequisites } from "docs-ui" - -export const metadata = { - title: `Deploy Medusa Application to Railway`, -} - -# {metadata.title} - -In this document, you’ll learn how to deploy your Medusa application to [Railway](https://railway.app/). - -## What You’ll Deploy - -1. PostgreSQL database. -2. Redis database. -3. Medusa application in server mode, with the Medusa Admin. -4. Medusa application in worker mode. - - - -The same Medusa project is used to deploy the server and worker modes. Learn more about the `workerMode` configuration in [this document](!docs!/learn/configurations/medusa-config#workermode). - - - ---- - - - -## 1. Configure Medusa Application - -### Worker Mode - -The `workerMode` configuration determines which mode the Medusa application runs in. As mentioned at the beginning of this guide, you’ll deploy two Medusa applications: one in server mode, and one in worker mode. - -So, add the following configuration in `medusa-config.ts`: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - projectConfig: { - // ... - workerMode: process.env.MEDUSA_WORKER_MODE as "shared" | "worker" | "server", - }, -}) -``` - -Later, you’ll set different values of the `MEDUSA_WORKER_MODE` environment variable for each Medusa application deployment. - -### Configure Medusa Admin - -You need to disable the Medusa Admin in the worker Medusa application, while keeping it enabled in the server Medusa application. So, add the following configuration in `medusa-config.ts`: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - admin: { - disable: process.env.DISABLE_MEDUSA_ADMIN === "true", - }, -}) -``` - -Later, you’ll set different values of the `DISABLE_MEDUSA_ADMIN` environment variable. - -### Configure Redis URL - -The `redisUrl` configuration specifies the connection URL to Redis to store the Medusa server's session. - - - -Learn more in the [Medusa Configuration documentation](!docs!/learn/configurations/medusa-config#redisurl). - - - -Add the following configuration in `medusa-config.ts` : - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - projectConfig: { - // ... - redisUrl: process.env.REDIS_URL, - }, -}) -``` - ---- - -## 2. Add predeploy Script - -Before you start the Medusa application in production, you should always run migrations and sync links. - -So, add the following script in `package.json`: - -```json -"scripts": { - // ... - "predeploy": "medusa db:migrate" -}, -``` - ---- - -## 3. Install Production Modules and Providers - -By default, your Medusa application uses modules and providers useful for development, such as the In-Memory Cache Module or the Local File Module Provider. It’s highly recommended to instead use modules and providers suitable for production, including: - -- [Redis Cache Module](../../../infrastructure-modules/cache/redis/page.mdx) -- [Redis Event Bus Module](../../../infrastructure-modules/event/redis/page.mdx) -- [Workflow Engine Redis Module](../../../infrastructure-modules/workflow-engine/redis/page.mdx) -- [S3 File Module Provider](../../../infrastructure-modules/file/s3/page.mdx) (or other file module providers production-ready). -- [SendGrid Notification Module Provider](../../../infrastructure-modules/notification/sendgrid/page.mdx) (or other notification module providers production-ready). - -For example, add the following modules to `medusa-config.ts`: - -```ts title="medusa-config.ts" -import { Modules } from "@medusajs/framework/utils" - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/cache-redis", - options: { - redisUrl: process.env.REDIS_URL, - }, - }, - { - resolve: "@medusajs/medusa/event-bus-redis", - options: { - redisUrl: process.env.REDIS_URL, - }, - }, - { - resolve: "@medusajs/medusa/workflow-engine-redis", - options: { - redis: { - url: process.env.REDIS_URL, - }, - }, - }, - ], -}) -``` - - - -Check out the [Integrations](../../../integrations/page.mdx) and [Infrastructure Modules](../../../infrastructure-modules/page.mdx) documentation for other modules and providers to use. - - - ---- - -## 4. Create Railway Project and Host PostgreSQL Database - - - -Push all changes you’ve made in the previous step to the GitHub repository before proceeding. - - - -To create a Railway project: - -1. Go to [Railway](https://railway.app/), and log in or create an account. -2. In your account dashboard, click the New Project button. -3. Choose Deploy PostgreSQL - -This creates a new project with just a PostgreSQL database. You’ll add more services in the next steps. - ---- - -## 5. Add Redis Database to Project - -To add a Redis database service to your project: - -1. Click on the Create button at the top right. -2. Choose Database → Add Redis - ---- - -## 6. Deploy the Medusa Application in Server Mode - -In this section, you’ll add a Medusa application service in server mode to the Railway project, configure, and deploy it. - -### Create Service - -To create the service for the Medusa application in server mode: - -1. Click on the Create button. -2. Choose GitHub Repo. -3. Choose the repository of your Medusa application. - -This adds a new service to your project. - -### Add Environment Variables - -To add environment variables to the Medusa application in server mode: - -1. Click on its card in the project dashboard. -2. Choose the Variables tab. -3. Click on RAW Editor, and paste the following in the editor: - -```bash -COOKIE_SECRET=supersecret # TODO GENERATE SECURE SECRET -JWT_SECRET=supersecret # TODO GENERATE SECURE SECRET -STORE_CORS= # STOREFRONT URL -ADMIN_CORS= # ADMIN URL -AUTH_CORS= # STOREFRONT AND ADMIN URLS, SEPARATED BY COMMAS -DISABLE_MEDUSA_ADMIN=false -MEDUSA_WORKER_MODE=server -PORT=9000 -DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}} -REDIS_URL=${{Redis.REDIS_PUBLIC_URL}} -``` - -Where: - -- The value of `COOKIE_SECRET` and `JWT_SECRET` must be a randomly generated secret. -- `STORE_CORS`'s value is the URL of your storefront. If you don’t have it yet, you can skip adding it for now. -- `ADMIN_CORS`'s value is the URL of the admin dashboard, which is the same as the server Medusa application. You can add it later if you don't currently have it. -- `AUTH_CORS`'s value is the URLs of any application authenticating users, customers, or other actor types, such as the storefront and admin URLs. The URLs are separated by commas. If you don’t have the URLs yet, you can set its value later. -- Set `DISABLE_MEDUSA_ADMIN`'s value to `false` so that the admin is built with the server application. -- `REDIS_URL`'s value is automatically generated using Railway’s template syntax. You add the `?family=0` to the connection string to support both IPv6 and IPv4 connections. - -Feel free to add any other relevant environment variables. Once you’re done, click the Update Variables button. - -### Set Start Command - -To set the `start` command of your Medusa application in server mode: - -1. Click on its card in the project dashboard. -2. Choose the Settings tab. -3. Scroll down to the Deploy section. -4. Under the “Custom Start Command” field, click the "+ Start Command" button. -5. Enter the following in the input and click the check mark button: - -```bash npm2yarn -cd .medusa/server && npm install && npm run predeploy && npm run start -``` - -### Deploy Changes - -To deploy the changes of the Medusa application in server mode, click on the Deploy button at the top center of the project. This takes a couple of minutes. - - - -Make sure to wait until the PostgreSQL and Redis services are fully deployed before deploying the Medusa application. - - - -### Set Domain Name - -You can either generate a random domain name or set a custom one. To do that: - -1. Click on the Medusa application running in server mode. -2. Choose the Settings tab. -3. Scroll down to the Networking section. -4. Under Public Networking, click on Generate domain to generate a domain name or Custom domain to add your custom domain. - 1. If the domain doesn't point to the `9000` port, make sure to edit it and set the port to `9000`. - -### Set Backend URL in Admin Configuration - -After you’ve obtained the Medusa application’s URL, add the following configuration to `medusa-config.ts`: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - admin: { - // ... - backendUrl: process.env.MEDUSA_BACKEND_URL, - }, -}) -``` - -Then, push the changes to the GitHub repository. - -In Railway, add / modify the following environment variables for the Medusa application in server mode to use the server Medusa application’s URL: - -```bash -ADMIN_CORS=https://railway... # MEDUSA APPLICATION URL -AUTH_CORS=https://railway... # ADD MEDUSA APPLICATION URL -MEDUSA_BACKEND_URL=https://railway... # MEDUSA APPLICATION URL -``` - -Where you set the value of `ADMIN_CORS` and `MEDUSA_BACKEND_URL` to the Medusa application’s URL you got from the previous step. As for `AUTH_CORS`, if you have another URL set, you add a comma `,` followed by the Medusa application’s URL. Otherwise, you set it to the Medusa application’s URL. - -Once you're done, click on the Deploy button at the top center of the dashboard to deploy the changes. - ---- - -## 7. Deploy the Medusa Application in Worker Mode - -In this section, you’ll add the Medusa application in worker mode to the Railway project, configure, and deploy it. - -The process is similar to deploying the application in server mode, with slight changes in the configuration. - -### Create Service - -To create the service for the Medusa application in worker mode: - -1. Click on the Create button. -2. Choose GitHub Repo. -3. Choose the same repository of your Medusa application. - -This adds a new service to your project. - -### Add Environment Variables - -To add environment variables to the Medusa application in worker mode: - -1. Click on its card in the project dashboard. -2. Choose the Variables tab. -3. Click on RAW Editor, and paste the following in the editor: - -```bash -COOKIE_SECRET=supersecret # TODO GENERATE SECURE SECRET -JWT_SECRET=supersecret # TODO GENERATE SECURE SECRET -DISABLE_MEDUSA_ADMIN=true -MEDUSA_WORKER_MODE=worker -PORT=9000 -DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}} -REDIS_URL=${{Redis.REDIS_PUBLIC_URL}} -``` - -Where: - -- The value of `COOKIE_SECRET` and `JWT_SECRET` must be a randomly generated secret. -- Set `DISABLE_MEDUSA_ADMIN`'s value to `true` so that the admin isn't built with the worker application. -- `REDIS_URL`'s value is automatically generated using Railway’s template syntax. You add the `?family=0` to the connection string to support both IPv6 and IPv4 connections. - -Feel free to add any other relevant environment variables. Once you’re done, click the Update Variables button. - -### Set Start Command - -To set the `start` command of your Medusa application in worker mode: - -1. Click on its card in the project dashboard. -2. Choose the Settings tab. -3. Scroll down to the Deploy section. -4. Under the “Custom Start Command” field, click the "+ Start Command" button. -5. Enter the following in the input and click the check mark button: - -```bash npm2yarn -cd .medusa/server && npm install && npm run start -``` - -### Deploy Changes - -To deploy the changes of the Medusa application in working mode, click on the Deploy button at the top center of the project. This takes a couple of minutes. - ---- - -## 8. Test Deployed Application - -To test out the deployed application, go to `/health`, where `` is the URL of the Medusa application in server mode. If the deployment was successful, you’ll see the `OK` response. - -The Medusa Admin is also available at `/app`. - ---- - -## Create Admin User - -To create an admin user, install the [Railway CLI tool](https://docs.railway.app/guides/cli). Then, log in: - -```bash -railway login -``` - -After that, run the following command in the local Medusa project's directory to link it to the Railway project: - -```bash -railway link -``` - -When asked to select a service, choose the service for the Medusa application in server mode. - -Then, in your local directory of the Medusa project, run the following command: - -```bash -railway run npx medusa user -e admin-medusa@test.com -p supersecret -``` - -Replace the email `admin-medusa@test.com` and password `supersecret` with the credentials you want. - -You can use these credentials to log into the Medusa Admin dashboard. - ---- - -## Troubleshooting - -To check issues or errors in your deployed Medusa application: - -1. Click on the card of the Medusa application in server mode. -2. Click on the Deployments tab. -3. Click on the View Logs button. - -### Set Host - -If you encounter issues with the Medusa application, try setting a `HOST` environment variable to `0.0.0.0`: - -```bash -HOST=0.0.0.0 -``` - -Learn more in the [Railway Documentation](https://docs.railway.com/guides/public-networking). - ---- - -## Update Deployed Application - -To update the deployed Medusa application, update the dependencies in the `package.json` file for `@medusajs/*` and re-install dependencies: - -```bash npm2yarn -npm install -``` - -Then, push the changes to the GitHub repository. In your application, the new dependency versions will be installed and migrations will run, updating your database. - -Learn more about updating Medusa in [this documentation](!docs!/learn/update). diff --git a/www/apps/resources/app/deployment/page.mdx b/www/apps/resources/app/deployment/page.mdx index d8010df35a..4145b249b8 100644 --- a/www/apps/resources/app/deployment/page.mdx +++ b/www/apps/resources/app/deployment/page.mdx @@ -24,29 +24,24 @@ With Cloud, you maintain full customization control as you deploy your own modul - Preview environments for new PRs. - Test on production-like data. -Cloud users also gets early access to new features (for example, Gift Cards and Draft Orders). - -[Sign up and learn more about Cloud](!cloud!) +[Sign up and learn more about Cloud](!cloud!). --- ## Self-hosting Medusa + + +Consider reading the [Cloud vs. Self-Hosting comparison guide](!cloud!/comparison) first. By using Cloud, you can avoid the complexities and challenges of self-hosting, while benefiting from automated deployment, scaling, and maintenance. + + + To host and maintain Medusa on your own, check out the following guides. - --- diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index ad175e0d4e..17514c5ace 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -101,9 +101,8 @@ export const generatedEditDates = { "app/commerce-modules/page.mdx": "2025-04-17T08:48:34.855Z", "app/create-medusa-app/page.mdx": "2025-07-14T08:51:06.654Z", "app/deployment/admin/vercel/page.mdx": "2024-10-16T08:10:29.377Z", - "app/deployment/medusa-application/railway/page.mdx": "2025-04-17T08:28:58.981Z", "app/deployment/storefront/vercel/page.mdx": "2025-05-20T07:51:40.712Z", - "app/deployment/page.mdx": "2025-06-24T08:50:10.114Z", + "app/deployment/page.mdx": "2025-09-29T10:23:47.833Z", "app/integrations/page.mdx": "2025-08-07T06:06:50.604Z", "app/medusa-cli/page.mdx": "2024-08-28T11:25:32.382Z", "app/medusa-container-resources/page.mdx": "2025-07-31T13:24:15.786Z", diff --git a/www/apps/resources/generated/files-map.mjs b/www/apps/resources/generated/files-map.mjs index ccecb17ad2..5d389444eb 100644 --- a/www/apps/resources/generated/files-map.mjs +++ b/www/apps/resources/generated/files-map.mjs @@ -727,10 +727,6 @@ export const filesMap = [ "filePath": "/www/apps/resources/app/data-model-repository-reference/tips/filtering/page.mdx", "pathname": "/data-model-repository-reference/tips/filtering" }, - { - "filePath": "/www/apps/resources/app/deployment/medusa-application/railway/page.mdx", - "pathname": "/deployment/medusa-application/railway" - }, { "filePath": "/www/apps/resources/app/deployment/page.mdx", "pathname": "/deployment" diff --git a/www/apps/resources/generated/generated-how-to-tutorials-sidebar.mjs b/www/apps/resources/generated/generated-how-to-tutorials-sidebar.mjs index 4007be4ddf..0a66fc50b7 100644 --- a/www/apps/resources/generated/generated-how-to-tutorials-sidebar.mjs +++ b/www/apps/resources/generated/generated-how-to-tutorials-sidebar.mjs @@ -659,14 +659,6 @@ const generatedgeneratedHowToTutorialsSidebarSidebar = { "path": "https://docs.medusajs.com/learn/deployment/general", "title": "General", "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/deployment/medusa-application/railway", - "title": "Railway", - "children": [] } ] }, diff --git a/www/apps/resources/next.config.mjs b/www/apps/resources/next.config.mjs index 1bb6b412ef..68d7d5cff6 100644 --- a/www/apps/resources/next.config.mjs +++ b/www/apps/resources/next.config.mjs @@ -269,6 +269,11 @@ const nextConfig = { destination: "/storefront-development/products/list", permanent: true, }, + { + source: "/deployment/medusa-application/railway", + destination: `${process.env.NEXT_PUBLIC_BASE_URL}/cloud/comparison`, + permanent: true, + }, ]) }, outputFileTracingExcludes: { diff --git a/www/apps/resources/sidebars/how-to-tutorials.mjs b/www/apps/resources/sidebars/how-to-tutorials.mjs index dddba6bb97..0ddf099377 100644 --- a/www/apps/resources/sidebars/how-to-tutorials.mjs +++ b/www/apps/resources/sidebars/how-to-tutorials.mjs @@ -257,11 +257,6 @@ While tutorials show you a specific use case, they also help you understand how path: "https://docs.medusajs.com/learn/deployment/general", title: "General", }, - { - type: "link", - path: "/deployment/medusa-application/railway", - title: "Railway", - }, ], }, { diff --git a/www/vale/styles/docs/We.yml b/www/vale/styles/docs/We.yml index b7e9150066..57fb9727a6 100644 --- a/www/vale/styles/docs/We.yml +++ b/www/vale/styles/docs/We.yml @@ -1,7 +1,7 @@ extends: existence message: "Avoid using first-person plural like '%s'." link: https://medusajs.notion.site/Style-Guide-Docs-fad86dd1c5f84b48b145e959f36628e0#9f0dc7c440b841d3bfcb006df12c2652 -level: error +level: warning ignorecase: true tokens: - we