Deploy Mercur (Self-Hosted Multi-Vendor Marketplace on Medusa)

Self-hosted multi-vendor marketplace on Medusa: admin and seller panels.

Deploy Mercur (Self-Hosted Multi-Vendor Marketplace on Medusa)

/var/lib/postgresql/data

Just deployed

/data

Just deployed

Just deployed

mercur-media

Bucket

Just deployed

Deploy and Host Mercur on Railway

Mercur, the open-source multi-vendor marketplace

Mercur is an open-source multi-vendor marketplace platform built on Medusa, the commerce engine with 36,000+ GitHub stars. It gives you a marketplace backend with an operator admin panel, a vendor panel where sellers manage their own products and orders, and the APIs for your storefront. This template deploys Mercur on Railway as a server and worker pair with Postgres, Redis and object storage for product images. Sharetribe's Live plan is $199–259/month. Your own Mercur marketplace runs for about $15–30/month, with no transaction fees and full control over the code.


What This Template Deploys

ServicePurpose
mercur-serverThe Medusa backend with Mercur's modules on port 9000 with a public HTTPS domain. It serves the Store, Admin and Vendor APIs, the admin panel at /dashboard and the vendor panel at /seller.
mercur-workerThe same app in worker mode: scheduled jobs, event subscribers and long-running workflows, with no public domain.
PostgresPostgres 18 with products, vendors, orders, customers and settings, on a persistent volume.
RedisEvent bus, workflow engine and locking for the server and worker.
BucketA Railway Bucket (mercur-media) for product images and uploads, served through short-lived signed links.

Both app services build from the same repository and differ only in MEDUSA_WORKER_MODE. Only the server runs database migrations; the worker waits for the schema, so the two never race each other.


About Hosting Mercur

A multi-vendor marketplace is much more than a store. Vendors need their own logins, catalogues, orders and payouts; the operator needs commission rules, approvals and oversight; and the backend needs background jobs for events, emails and imports. Mercur adds all of that on top of Medusa's commerce engine. However, it publishes no ready-made image: you scaffold a project and build it yourself, and its default setup expects tools and a file layout that most hosts don't provide.

This template packages a working build. It pins the dependencies that break with npm, stores uploads in object storage so the server and worker see the same files, trusts Railway's proxy correctly, and adds security headers to the panels. On Railway, the server gets HTTPS automatically, Postgres and Redis run on the private network, and the first admin is created at deploy time.

No storefront is included. You get the backend, the admin panel and the vendor panel. Connect your own storefront (for example a Next.js app) to the Store API, or use the API from a mobile app.

Demo data on first boot. The server seeds a demo marketplace with three sample sellers, using a generated password rather than upstream's hard-coded one. Set MERCUR_SEED_DEMO_DATA=false before the first deploy to start empty.

Typical cost: ~$15–30/month on Railway for the server, worker, Postgres, Redis and storage. Sharetribe Live costs $199/month billed yearly, or $259 monthly.


Deploy Mercur in Under 15 Minutes

  1. Set MEDUSA_ADMIN_EMAIL to your email, then click Deploy on Railway. The first build takes about 8–12 minutes.
  2. Copy MEDUSA_ADMIN_PASSWORD from the mercur-server service's Variables tab.
  3. Open https://your-app.up.railway.app/dashboard and sign in as the marketplace operator.
  4. Review the demo sellers and products, or remove them and invite your own vendors.
  5. Sellers sign in at /seller to manage their catalogue and orders. Connect your storefront to the Store API.

No monorepo build on your laptop. No package-manager surprises. No transaction fees.


Common Use Cases

  • Multi-vendor marketplace. Let many sellers list and sell products under your brand.
  • Self-hosted Sharetribe alternative. Own the platform and the code instead of paying a monthly platform fee.
  • B2B marketplaces. Connect suppliers and buyers, with vendor-managed catalogues.
  • Niche and local marketplaces. Handmade goods, local food producers, rentals or second-hand items.
  • Headless commerce. Build your own storefront and apps on Medusa's APIs.
  • Marketplace MVPs. Launch with real seller and admin panels from day one.
  • Agencies building marketplaces for clients. Start from a working backend and customise it.

Configuration

VariableRequiredDescription
MEDUSA_ADMIN_EMAIL✅ Setadmin@example.com by default. Change it to your email before deploying.
MEDUSA_ADMIN_PASSWORD🔐 Auto-generatedPassword for the first marketplace admin.
MERCUR_SEED_SELLER_PASSWORD🔐 Auto-generatedPassword for the three demo sellers.
JWT_SECRET, COOKIE_SECRET🔐 Auto-generatedSign API tokens and session cookies. The worker uses the server's values.
MERCUR_BACKEND_URL✅ Auto-injectedPublic URL of mercur-server. It's built into the panels at build time.
MERCUR_VENDOR_URL✅ Auto-injectedThe vendor panel URL, /seller on the same domain.
MEDUSA_WORKER_MODE✅ Setserver on mercur-server and worker on mercur-worker.
DATABASE_URL, REDIS_URL✅ Auto-injectedPostgres and Redis on the private network.
S3_BUCKET, S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY✅ Auto-injectedThe Railway Bucket for uploads.
NODE_OPTIONSOptional--max-old-space-size=4096, the Node heap ceiling.

Using a custom domain? Add it to mercur-server, update MERCUR_BACKEND_URL and MERCUR_VENDOR_URL, and redeploy both services. The panels need a rebuild to pick up the new URL.

Payments and commissions. Mercur and Medusa support payment providers such as Stripe through plugins. Configure your provider and commission rules in the admin panel before inviting real sellers.


Mercur on Railway vs. Alternatives

Mercur on RailwaySharetribeCS-Cart Multi-VendorShopify with marketplace apps
Monthly cost~$15–30 usage$199 yearly or $259 monthly (Live)Paid licence plus hostingShopify plan plus app fees
Self-hosted✅ Yes❌ No✅ Yes❌ No
Vendor panel included✅ Yes✅ Yes✅ Yes⚠️ Via app
Platform transaction fees✅ None✅ None on Live✅ None⚠️ Depends on payment setup
Headless API for any storefront✅ Medusa APIs⚠️ Limited⚠️ Limited✅ Storefront API
Full code access✅ Yes❌ No⚠️ Licensed source❌ No
License✅ MIT❌ Proprietary❌ Proprietary❌ Proprietary

Dependencies for Mercur Hosting

  • Railway account. Pro is recommended for two Node services and the build.
  • A payment provider account, such as Stripe, for real transactions.
  • A storefront: build your own or use a Medusa-compatible starter.

Deployment Dependencies

Implementation Details

The repository is Mercur's basic template with Railway changes: a committed npm lockfile, dependency pins that npm needs, uploads in object storage so the worker and server share files, a wider proxy trust setting, and security headers on the admin and vendor panels. The server entrypoint migrates, creates the first admin and seeds demo data once, then starts Medusa. The worker waits for the schema before starting.

Upgrading Mercur means updating the vendored source, so treat the repository as your own project from here on.


Frequently Asked Questions

What is Mercur? An open-source multi-vendor marketplace platform built on Medusa. It adds vendors, a vendor panel, commissions and marketplace workflows on top of Medusa's commerce engine.

How much does it cost compared to Sharetribe? About $15–30/month on Railway, with no platform fee. Sharetribe Live costs $199/month billed yearly, or $259 monthly, plus payment processing fees.

Why does the admin panel show the wrong URL after I added a custom domain? The panels have their backend URL built in. Update MERCUR_BACKEND_URL and MERCUR_VENDOR_URL, then redeploy so the panels rebuild.

Do I lose products or orders when Railway redeploys? No. Data is in Postgres on its volume and images are in the Railway Bucket. Redeploys keep everything.

Is a storefront included? No. The template includes the backend, admin panel and vendor panel. Connect any storefront to the Store API.

How do I remove the demo sellers? Delete them in the admin panel, or set MERCUR_SEED_DEMO_DATA=false before the first deploy so they're never created.


Why Deploy and Host 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 get a working multi-vendor marketplace backend with admin and vendor panels, background workers and object storage, on code you fully own.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
50
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51