You're paying $79 a month for a Shopify plan, another $19 for an app that handles bundles, $15 for the review widget, and suddenly you're at $113 before you've sold a single thing this month. Sound familiar?
That's the moment a lot of small sellers start Googling "Shopify alternatives" at midnight. And one name that keeps coming up — especially in developer circles — is Medusa.js. But most tutorials assume you have a full engineering team standing by. You don't. So let's fix that.
This guide walks you through what Medusa.js actually is, what it costs to run in the real world, and the concrete steps to get a working storefront live for under $50 a month. No fluff, no bait-and-switch pricing reveals at the end.
What Medusa.js Is (and What It Isn't)
Medusa.js is an open-source, headless commerce engine. "Headless" just means the backend — the part that tracks your products, orders, customers, and inventory — is completely separate from the frontend your shoppers actually see. You get to choose (or build) the storefront layer yourself.
That separation is the whole point. When your commerce logic isn't glued to a proprietary theme system, you can swap storefronts, add sales channels, or plug in a new payment provider without migrating your entire business.
What it isn't: a drag-and-drop website builder. You'll write some code, or at least edit config files. If that sounds intimidating, keep reading — the steps below are genuinely approachable if you've ever edited a JSON file or pushed code to GitHub.
The core stack you'll end up with:
- Medusa server (Node.js backend, handles commerce logic)
- A PostgreSQL database (stores everything)
- A Next.js storefront (the shop your customers browse)
- A file storage bucket (product images)
Why the Pricing Actually Works Out
Here's the honest math, because vague promises aren't useful.
A typical hobby-to-early-revenue setup on Railway (a developer-friendly cloud platform) runs like this:
| Service | Monthly cost |
|---|---|
| Medusa server (Railway Starter) | ~$5 |
| PostgreSQL on Railway | ~$5 |
| Next.js storefront on Vercel (Hobby) | $0 |
| Cloudflare R2 for image storage (first 10 GB) | $0 |
| Stripe (payment processing) | 2.9% + 30¢ per transaction |
| Total fixed cost | ~$10–$20/month |
Even if you upgrade the Railway plan as traffic grows, you're looking at $30–$50 a month until you're doing serious volume — at which point you can afford to revisit. Compare that to a mid-tier Shopify plan plus four apps and you're saving $60–$90 every single month.
The trade-off is setup time. Budget a weekend, not an afternoon.
Step 1 — Spin Up Your Medusa Backend
First, make sure you have Node.js 18+ and npm installed locally. Then open your terminal and run:
npx create-medusa-app@latest my-store
The CLI will ask a few questions — choose the default Next.js storefront when prompted, and say yes to seeding demo data. This gives you a working store with sample products so you can see everything functioning before you add your own catalog.
Once it finishes, you'll have two folders: my-store (the backend) and my-store-storefront (the Next.js frontend).
Run it locally first. In the backend folder:
cd my-store
medusa develop
Then in a second terminal window, start the storefront:
cd my-store-storefront
npm run dev
Visit http://localhost:8000 and you should see a real, working storefront with demo products. Add one to your cart. Go through the checkout. It works. That feeling is worth pausing on for a second — you just ran a full headless commerce stack on your laptop.
Step 2 — Deploy the Backend to Railway
Local is great for testing. You need the backend somewhere public so your storefront can talk to it.
- Push your
my-storefolder to a new GitHub repository. - Sign up at railway.app and create a new project from that GitHub repo.
- Railway will detect it's a Node app. Add these environment variables in the Railway dashboard:
DATABASE_URL— Railway can provision a Postgres database for you; grab the connection string from there.JWT_SECRET— any long random string (use a password generator).COOKIE_SECRET— same deal, different string.STORE_CORS— set this to your future storefront URL (you can update it after deploying the frontend).
- Hit deploy. Railway builds and starts your Medusa server. The first deploy takes 3–5 minutes.
Once it's live, Railway gives you a public URL like my-store-production.up.railway.app. Copy that — you'll need it in the next step.
Quick gut-check: visit [your-railway-url]/store/products in a browser. You should see a JSON response with your demo products. If you do, the backend is healthy.
Step 3 — Deploy the Storefront to Vercel
Vercel is the natural home for Next.js apps, and their free Hobby tier handles a surprising amount of traffic — up to 100 GB of bandwidth a month.
- Push
my-store-storefrontto its own GitHub repository. - Import it into Vercel (vercel.com → New Project → import from GitHub).
- Set one environment variable:
NEXT_PUBLIC_MEDUSA_BACKEND_URL= your Railway URL from Step 2. - Deploy.
Vercel gives you a .vercel.app URL immediately. Open it — your storefront is live on the internet. Go back to Railway and update STORE_CORS to match this Vercel URL, then redeploy the backend so it accepts requests from your storefront domain.
At this point you have a functioning headless store with real checkout capability (Stripe test mode is active by default). Total time so far: probably 2–3 hours if you hit no snags.
Step 4 — Add Your Products and a Real Payment Key
Medusa ships with an admin dashboard at /app on your backend URL. Open [your-railway-url]/app, create an admin account, and log in.
From here you can:
- Delete the demo products and add your own (title, description, variants, pricing, images)
- Set up shipping options (flat rate works fine to start — $5.99 domestic is a common starting point)
- Connect your live Stripe keys under Settings → Payment Providers
For images, Medusa defaults to local storage, which doesn't work well on Railway's ephemeral filesystem. Swap it for Cloudflare R2 — it's S3-compatible, and the first 10 GB of storage plus 1 million Class A operations per month are free. The medusa-file-r2 community plugin handles the connection in about 10 minutes of config.
Once your Stripe live keys are in and you've uploaded a real product with a real price, do one more end-to-end test: add to cart, check out, use a real card for $1. Confirm the order shows up in your Medusa admin and in your Stripe dashboard. Then refund yourself. That full loop working means you're actually open for business.
A Real-World Example: Candle Shop Migration
A seller I know — small batch candles, about 40 SKUs — was on a mid-tier Shopify plan with three paid apps (reviews, bundles, and a custom shipping calculator). Her monthly platform cost was $142.
She migrated to this Medusa stack over two weekends. Her fixed monthly cost dropped to $18 (Railway + a small Cloudflare Workers script for her shipping logic). She used the $124/month she saved to fund a small Meta ads budget instead.
Her storefront is faster too — her Largest Contentful Paint went from 3.1 seconds to 1.4 seconds after moving to a static-first Next.js frontend, which her SEO consultant said was the single biggest win they'd seen that quarter.
Is her setup more complex to maintain? Yes, honestly. She learned to use Railway's deploy logs and she keeps a staging environment. But she said the control feels worth it — she's not waiting on an app developer to ship a feature she needs.
What to Tackle After You're Live
Getting live is step one. Here are three things worth doing in your first 30 days:
1. Set up transactional emails. Medusa supports SendGrid and Resend out of the box. Customers expect order confirmations within seconds — don't skip this. Resend has a free tier covering 3,000 emails a month.
2. Add a search layer. Medusa integrates with MeiliSearch, which you can also host on Railway for about $5/month. Even a 20-product catalog benefits from real search — shoppers who use search convert at roughly 2–3x the rate of browsers.
3. Connect a CDN to your storefront. Vercel handles this automatically for the Next.js app, but if you add a custom domain (which you should — it costs $10–$15/year through Cloudflare Registrar), make sure your DNS is pointing through Cloudflare's proxy for the extra caching layer.
You Can Actually Do This
Headless commerce used to mean a six-figure engineering budget and a dedicated DevOps person. That's genuinely not true anymore. Medusa.js, Railway, and Vercel have collectively made it possible for a solo operator to run a real, fast, flexible storefront for less than a dinner out each month.
Is it the right move for every store? No — if you're doing less than $2,000/month in revenue and you're not technical at all, the saved money might not offset the learning curve yet. But if you're comfortable with a terminal and you're tired of watching your platform fees eat into thin margins, this stack is worth a weekend.
Your next step: run npx create-medusa-app@latest locally today, just to see it. You don't have to deploy anything yet. Just watch it spin up and poke around the admin. That's enough to know whether this path is for you.