Deploy medusa-store
Deploy Medusa Worker and Server with a private connection to Redis.
Medusa
Medusa Server
Just deployed
Medusa Worker
Just deployed
Redis
Just deployed
/data
Deploy and Host medusa-store on Railway
What is medusa-store?
medusa-store is a scalable, open-source commerce backend built on Medusa. It provides APIs for product catalogs, carts, orders, payments, and fulfillment, and is designed to be extended with custom services, workers, and integrations such as CMS platforms, background job queues, and object storage.
About Hosting medusa-store
Hosting medusa-store involves deploying a Node.js Medusa backend along with supporting infrastructure such as a PostgreSQL database, Redis for background jobs and caching, and object storage for media assets. In production setups, Medusa commonly runs as separate Server and Worker instances, both sharing the same database and Redis connection. Environment variables are used to configure integrations like Payload CMS for content management and S3-compatible storage providers such as Cloudflare R2. Railway simplifies this by managing services, private networking, and environment configuration in a single platform.
Common Use Cases
- Headless commerce backend for custom storefronts (Next.js, Remix, Nuxt)
- Multi-region or multi-tenant e-commerce platforms
- Commerce systems with background processing for emails, fulfillment, and webhooks
Dependencies for medusa-store Hosting
- Node.js (Medusa backend and worker)
- PostgreSQL (primary application database)
- Redis (job queue, caching, event bus)
- S3-compatible object storage (e.g. Cloudflare R2)
Deployment Dependencies
- Medusa Framework: https://docs.medusajs.com
- Railway Platform: https://railway.app
- Payload CMS: https://payloadcms.com
- Cloudflare R2 (S3-compatible storage): https://developers.cloudflare.com/r2/
Implementation Details
A typical Railway setup runs two services from the same repository:
- Server service: runs
medusa start - Worker service: runs
medusa worker
Both services share environment variables such as:
DATABASE_URL(PostgreSQL)REDIS_URL(private Redis domain)- CMS connection variables for Payload
- S3 configuration variables for Cloudflare R2
Why Deploy medusa-store on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying medusa-store on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Redis
redis:8.2.1Medusa Server
DrunkOldDog/ecommerce-medusa-payload-nextjsS3_BUCKET
Your bucket name
S3_SECRET
S3_ENDPOINT
https://<YOUR_CODE>.r2.cloudflarestorage.com
S3_FILE_URL
Public Development URL or Custom Domains
DATABASE_URL
postgresql://<YOUR_DB_URL>
S3_ACCESS_KEY_ID
Medusa Worker
DrunkOldDog/ecommerce-medusa-payload-nextjsS3_BUCKET
Your bucket name
S3_SECRET
S3_ENDPOINT
https://<YOUR_CODE>.r2.cloudflarestorage.com
S3_FILE_URL
Public Development URL or Custom Domains
DATABASE_URL
postgresql://<YOUR_DB_URL>
S3_ACCESS_KEY_ID