---
title: "Deploy Medusajs 2.0 + Storefront (B2B)"
description: "Fork of the official Medusajs V2 B2B starter, tweaked for Railway"
category: "Other"
url: https://railway.com/deploy/medusajs-20-storefront-b2b
---

# Deploy Medusajs 2.0 + Storefront (B2B)

Fork of the official Medusajs V2 B2B starter, tweaked for Railway

**[Deploy Medusajs 2.0 + Storefront (B2B) on Railway](https://railway.com/template/medusajs-20-storefront-b2b)**

- **Creator:** Rasmus Puls's Projects
- **Category:** Other
- **Total deploys:** 64

## Template content

### Backend https://res.cloudinary.com/hczpmiapo/image/upload/v1731251847/Static%20assets/Logos/Medusa_kxzkos.png

- **Source:** rpuls/medusa-b2b-for-railway
- **Health check:** /health
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:latest

### Storefront https://medusajs.com/_next/image/?url=%2Fimages%2Fnextjs-app-logo-3c93cee1.png&w=256&q=75

- **Source:** rpuls/medusa-b2b-for-railway
- **Start command:** `npm run start`
- **Health check:** /api/healthcheck
- **Public domain:** Yes

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** redis:8.2.1

### Bucket-proxy

- **Image:** ghcr.io/railwayapp/function-bun:1.3.0
- **Start command:** `./run.sh aW1wb3J0IHsgczMgfSBmcm9tICJidW4iOwoKY29uc3QgQ0FDSEVfQ09OVFJPTCA9CiAgQnVuLmVudi5DQUNIRV9DT05UUk9MIHx8ICJwdWJsaWMsIG1heC1hZ2U9MzE1MzYwMDAsIGltbXV0YWJsZSI7CgpleHBvcnQgZGVmYXVsdCB7CiAgYXN5bmMgZmV0Y2gocmVxOiBSZXF1ZXN0KTogUHJvbWlzZTxSZXNwb25zZT4gewogICAgY29uc3QgdXJsID0gbmV3IFVSTChyZXEudXJsKTsKCiAgICAvLyBQdWJsaWMgaGVhbHRoIGNoZWNrIGZvciBSYWlsd2F5LgogICAgaWYgKHVybC5wYXRobmFtZSA9PT0gIi9oZWFsdGgiKSB7CiAgICAgIHJldHVyb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CiAgICBjb25zdCBoZWFkZXJzOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmc+ID0gewogICAgICAiQ29udGVudC1UeXBlIjogc3RhdC50eXBlIHx8ICJhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0iLAogICAgICAiQ29udGVudC1MZW5ndGgiOiBTdHJpbmcoc3RhdC5zaXplKSwKICAgICAgIkNhY2hlLUNvbnRyb2wiOiBDQUNIRV9DT05UUk9MLAogICAgICAiWC1Db250ZW50LVR5cGUtT3B0aW9ucyI6ICJub3NuaWZmIiwKICAgIH07CgogICAgcmV0dXJuIHJlcS5tZXRob2QgPT09ICJIRUFEIgogICAgICA/IG5ldyBSZXNwb25zZShudWxsLCB7CiAgICAgICAgICBzdGF0dXM6IDIwMCwKICAgICAgICAgIGhlYWRlcnMsCiAgICAgICAgfSkKICAgICAgOiBuZXcgUmVzcG9uc2UoZmlsZS5zdHJlYW0oKSwgewogICAgICAgICAgc3RhdHVzOiAyMDAsCiAgICAgICAgICBoZWFkZXJzLAogICAgICAgIH0pOwogIH0sCn07`
- **Public domain:** Yes

## Buckets

- **Bucket**

## Documentation

# Deploy and Host MedusaJS 2.0 + Storefront (B2B) on Railway

This template lets you deploy a **B2B-oriented MedusaJS 2.0 setup** on Railway in just a few clicks. It is based on a fork of the official MedusaJS B2B repository, tweaked to better fit Railway’s cloud environment. Includes backend, admin dashboard, and a connected storefront tailored for business-to-business use cases. Version **2.17.2** (Updated on July  23. 2026).

## About Hosting MedusaJS 2.0 + Storefront (B2B)

This is (currently) an experimental beta template intended for testing and exploration. It sets up a minimal MedusaJS B2B stack on Railway, with connections for Postgres, Redis, MinIO, and a frontend storefront. Because this is a fork and has not been deeply tested, some features might not work as expected. Use it to experiment with or adapt Medusa’s B2B tools in a managed cloud environment.  
If you run into issues or missing functions, please report in the discussion forum.

## Common Use Cases

- Exploring Medusa’s B2B setup and features on Railway  
- Testing company accounts, multi-user roles, and tiered pricing  
- Adapting for custom B2B workflows or rapid prototyping  

## Dependencies for MedusaJS 2.0 + Storefront (B2B) Hosting

- GitHub account and Railway account  
- Railway Hobby plan

### Deployment Dependencies

- [MedusaJS official docs](https://github.com/medusajs/b2b-starter-medusa)  
- [GitHub repo (Railway fork)](https://github.com/rpuls/medusa-b2b-for-railway)  
- [Medusa community Discord](https://discord.com/invite/medusajs)

### Implementation Details

- Configures backend, admin dashboard, and storefront automatically  
- Uses PostgreSQL, Redis, and MinIO
- Admin user auto-created at deployment

## Why Deploy MedusaJS 2.0 + Storefront (B2B) 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 MedusaJS 2.0 + Storefront (B2B) 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.

Looking for MedusaJS D2J template? Please see: https://funkyton.com/medusajs-2-0-is-finally-here/


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/medusajs-20-storefront-b2b
