---
title: "Deploy Mercur"
description: "Multi-vendor marketplace on Medusa: admin, seller panel and storefront"
category: "Other"
url: https://railway.com/deploy/marketplace
---

# Deploy Mercur

Multi-vendor marketplace on Medusa: admin, seller panel and storefront

**[Deploy Mercur on Railway](https://railway.com/template/marketplace)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/marketplace/manifest.json

- **Creator:** Two Workspaces
- **Category:** Other

## Template content

### Mercur https://raw.githubusercontent.com/two-workspaces/mercur/main/icon.svg

- **Image:** ghcr.io/two-workspaces/mercur:2e82eb6
- **Health check:** /health
- **Public domain:** Yes

### Worker https://raw.githubusercontent.com/two-workspaces/mercur/main/icon.svg

- **Image:** ghcr.io/two-workspaces/mercur:2e82eb6

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

- **Image:** postgres:17.12-alpine

### Storefront https://raw.githubusercontent.com/two-workspaces/mercur/main/icon.svg

- **Image:** ghcr.io/two-workspaces/mercur-storefront:2e82eb6
- **Health check:** /robots.txt
- **Public domain:** Yes

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

- **Image:** redis:8.12.0-alpine
- **Start command:** `/bin/sh -c "rm -rf /data/lost+found && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --maxmemory-policy noeviction --appendonly yes --dir /data"`

## Documentation

# Deploy and Host Mercur on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/new/template/marketplace?referralCode=sLjDXb&utm_medium=integration&utm_source=button&utm_campaign=mercur)

Mercur is an open-source multi-vendor marketplace platform built on Medusa, a self-hosted alternative to Mirakl or Sharetribe. Sellers sign up, list offers and manage their orders in their own vendor panel; you run the marketplace from the admin panel, approve sellers and set commissions; customers buy from many sellers in one cart on the storefront. This template runs Mercur 2.4.1 on Railway as the full stack Mercur's own installer sets up: the backend with both panels, a background worker, the Next.js storefront, Postgres and Redis, with a demo marketplace seeded on the first boot.

This is a community template, not made or supported by the Mercur authors.

## About Hosting Mercur

Deploy, then give the first boot two or three minutes: the Mercur service migrates the database and seeds the demo marketplace before it answers, and the storefront waits for it.

- **Admin panel:** open the Mercur service's domain at `/dashboard` and sign in with `MEDUSA_ADMIN_EMAIL` (set it to your email before deploying) and the generated `MEDUSA_ADMIN_PASSWORD`, both on the Mercur service's Variables tab.
- **Vendor panel:** the same domain at `/seller`. The demo sellers (`seller@mercur.dev` is the first) sign in with the generated `MERCUR_SEED_SELLER_PASSWORD`. New sellers register there themselves, and you approve them in the admin panel.
- **Storefront:** the Storefront service's domain. It shows the demo sellers' shoes, with cart and checkout.

**Why the passwords are generated:** Mercur's demo seed signs every seller in with the password `supersecret`. On a public address that is a login anyone could guess, so this template seeds them with a password generated for your deploy instead. The admin account is created from your variables too.

**The demo data:** three sellers, 12 products and 244 offers in seven EU countries (euro prices), so the storefront has something to show. To start empty, set `MERCUR_SEED_DEMO=false` on the Mercur service before the first deploy; then create a region, a sales channel and a publishable API key in the admin panel, and put the key in the storefront's `NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY`.

**Payments and email:** checkout works with Medusa's built-in manual payment out of the box. For card payments and seller payouts, Mercur supports Stripe Connect: see Mercur's documentation for the backend variables, and set the storefront's `NEXT_PUBLIC_STRIPE_KEY`. Mercur sends no email until you add an email provider such as Resend.

**Memory:** idle in testing, the Mercur service used about 270 MB, the Worker about 210 MB and the Storefront about 150 MB, so each fits a 0.5 GB service; give the Mercur service 1 GB or more for real traffic.

**Your data:** orders, sellers and products are in the Postgres service's volume. Uploaded product images are on the Mercur service's volume at `/app/static`. Redis keeps running workflows and the event queue on its own volume. Redeploys keep all three.

**Custom domains:** for the backend, add the domain to the Mercur service (port 9000) and set `MERCUR_BACKEND_URL=https://api.example.com`; the panels pick it up on the next start. For the shop, add it to the Storefront service (port 8000), set its `NEXT_PUBLIC_BASE_URL`, and add the address to the Mercur service's `STORE_CORS`.

## Common Use Cases

- Launching a multi-vendor marketplace where independent sellers list and ship their own products
- A B2B or B2C platform that takes a commission on every order without paying a SaaS share of GMV
- Moving an existing single-store Medusa shop to a marketplace with seller onboarding and payouts
- A headless marketplace backend for your own frontend or mobile app, with the store API ready
- Trying out Mercur's admin, vendor and storefront apps before building on its TypeScript codebase

## Dependencies for Mercur Hosting

- Postgres 17 (included)
- Redis 8 (included)
- A Stripe account for card payments and seller payouts (optional)
- An email provider such as Resend for order and account emails (optional)

### Deployment Dependencies

- [Mercur on GitHub](https://github.com/mercurjs/mercur)
- [Mercur documentation](https://docs.mercurjs.com)
- [Medusa documentation](https://docs.medusajs.com)
- [Template source](https://github.com/two-workspaces/mercur)

### Implementation Details

- **Services:** Mercur (the Medusa backend with Mercur's core, serving the API, the admin panel at `/dashboard` and the vendor panel at `/seller`), Worker (the same image in Medusa's worker mode: subscribers, scheduled jobs and workflow steps), Storefront (Mercur's Next.js B2C storefront), Postgres 17 and Redis 8. Postgres and Redis are reachable only on Railway's private network.
- **Images:** built from Mercur's own starter (`templates/basic`, what `bun create mercur-app` downloads) and storefront at release 2.4.1, pinned, by this repo's GitHub Actions, so a deploy pulls finished images instead of building on Railway.
- **One image for every domain:** the panels and the storefront are built with placeholder addresses and keys, and each service writes your deploy's values into a fresh copy at boot. Changing a domain variable takes effect on the next restart, with no rebuild.
- **Server and worker share Redis:** Mercur's starter keeps events, workflows and locks in memory, which works only when one process does everything. This template puts them on Redis so the Worker sees what the Mercur service does.
- **Postgres without TLS:** Medusa turns on TLS to Postgres in production; Railway's private network has none, so the template switches it off. Set `DATABASE_SSL=true` if you point it at a database that needs TLS.
- **Storefront key:** the storefront reads the publishable API key the seed created straight from the database at boot, as Mercur's installer does, so nothing needs copying between services.
- **Cache refresh:** when products or offers change, the backend calls the storefront's revalidation hook over the private network with a shared secret, so the shop updates without a redeploy.

## Why Deploy Mercur 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 Mercur 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.


## 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) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/marketplace
