Skip to content
AgentThread
Open Source#e-commerce#shopify-alternative#self-hosted#store#retail#commerce

Medusa: Build an Online Store Without Paying Shopify's Cut Forever

An open-source commerce engine that gives you a complete product catalog, checkout, and order management system to host on your own infrastructure.

AgentThread7 min read
Share

Shopify is easy to start with. It is also a subscription you pay every month for the life of your store, plus a transaction fee on every sale you make unless you route payments through Shopify Payments. That fee ranges from 0.5 percent to 2 percent depending on your plan. On a store doing $500,000 a year in revenue, the fee alone is between $2,500 and $10,000 annually, before the $29 to $299 monthly platform cost.

Medusa is the open-source answer to that math. It is a self-hosted commerce platform with 35,470 stars on GitHub, licensed under MIT (which means free to use, modify, and distribute, including for commercial purposes), and built specifically so you can run an online store on your own infrastructure at zero per-transaction cost. You pay only the hosting bill. The trade-off is that you set it up yourself. If you have an AI agent to do that work, the trade-off shrinks considerably.

At a glance

FactValue
What it isOpen-source commerce engine
Built byMedusa Commerce (open-source)
LicenseMIT (free to use and modify)
PlatformsDocker, Node.js, any cloud or VPS
RequiresNode.js and PostgreSQL; technical setup but Docker-friendly
Install methodCLI installer or Docker Compose
VerdictUse if you need a self-hosted store with full control over checkout and no per-transaction fees

What Medusa actually is

Medusa is a backend commerce server written in JavaScript. The backend runs on Node.js (a JavaScript runtime that lets you run JavaScript code on a server, not just in a browser) and exposes its functionality through REST APIs (standardized web endpoints that any frontend, agent, or integration can call to perform commerce operations). Those endpoints cover the entire store lifecycle: create products, add inventory, accept payments, manage carts, process orders, issue refunds, handle shipping.

Medusa v2 is modular, meaning you install only the pieces you need. The core backend is not coupled to a specific storefront. You bring your own frontend or use the Next.js starter template that ships with the project. Next.js is a React-based framework for building web applications; Medusa's starter gives you a production-ready storefront you can deploy immediately. This is different from Shopify, where the storefront is managed for you and customization is limited to their theme system.

The database layer uses PostgreSQL, an open-source relational database. PostgreSQL stores all your commerce data: products, variants, customers, orders, inventory. You own it, can query it directly, and can move it to any hosting provider.

The project is at medusajs.com and the code is at github.com/medusajs/medusa.

What you get after installing it

The default Medusa installation ships a fully functional commerce stack. There is no partial install that leaves you assembling pieces from separate projects.

Product catalog and inventory covers product creation with variants (size, color, material, and any other attribute combination), inventory tracking per variant, multi-warehouse support, and category management. A product with 12 size-color combinations is one product record, not 12.

Cart and checkout is the full purchase flow: add to cart, apply discounts, calculate taxes, select shipping method, submit payment. The discount engine supports percentage-off, fixed-amount, and free-shipping rules with usage limits.

Payment and shipping integrations cover Stripe and PayPal for payment, and FedEx, UPS, and DHL for fulfillment, all through official plugins. Tax calculation can be automated or configured manually per region.

Admin dashboard is a web-based UI for managing the store through a browser. Create products, view orders, process returns, manage customers. No command line required for day-to-day operations.

AI agent access is built into the architecture. Because Medusa is API-first, an AI agent can call those same REST APIs to manage inventory, create or update products, check order status, and trigger fulfillment without a human touching the admin dashboard. An agent running in Claude Code, Cowork, or ChatGPT Work can execute a command like "create a product variant for the navy colorway in sizes S through XL at $89, set inventory to 200 units" directly through the API.

Subscriptions and B2B commerce are available via official plugins, not included in the default install.

The install experience

Medusa targets developers for initial setup, but the process is defined well enough that an AI agent can execute it. The recommended path is the CLI installer:

npx create-medusa-app@latest

That command scaffolds a new project, prompts for a name, and sets up the directory structure. Prerequisites are Node.js (version 20 or higher) and a running PostgreSQL instance.

The Docker Compose route is more reproducible for anyone deploying to a VPS (a virtual private server, meaning a rented Linux machine you control) or a cloud provider. Docker Compose is a tool that lets you define and start multiple containers (isolated, self-contained software environments) with a single configuration file. The Medusa repository ships a docker-compose.yml that starts the backend and the PostgreSQL database together.

First-time configuration requires setting environment variables (configuration values stored outside your code, such as database connection strings and payment API keys) for your database, your Stripe or PayPal keys, and a JWT secret (a private string used to sign authentication tokens so the server can verify requests are legitimate). You are filling in a config file, not writing code.

Setup time for a developer with Node.js experience: about 30 minutes. For a non-coder directing an AI agent: the agent handles the command execution, but you supply the API keys from Stripe and your hosting provider.

Where it fits and what to compare it to

Medusa is for stores that need full ownership of the commerce infrastructure and have the technical resources to run it, whether that is a developer or an AI agent.

Shopify is the right answer if you want to be selling in an afternoon with no setup. The tradeoff is the monthly fee, the transaction fee, and meaningful constraints on customization. Shopify's checkout flow is controlled by Shopify. With Medusa, you own the checkout code entirely.

WooCommerce is a commerce plugin for WordPress, an open-source content management system (software that manages website content without coding). WooCommerce is free and widely supported, but you inherit the WordPress operational footprint: plugin management, PHP (a server-side scripting language) updates, and a heavier attack surface. For a store not already on WordPress, Medusa is cleaner.

BigCommerce is a hosted SaaS (software-as-a-service) platform similar to Shopify: monthly fee, no infrastructure to manage. Not a self-hosted option.

Saleor is the closest open-source peer: API-first, MIT-licensed, built on Python and Django (a Python web framework). Saleor uses a GraphQL API (an alternative to REST that lets clients specify exactly what data they need). If your team is Python-first, Saleor is worth evaluating. Otherwise Medusa's Node.js ecosystem and plugin library give it a practical edge.

The decision comes down to one question: do you want to own the infrastructure or pay someone else to run it? If ownership, Medusa is a serious platform, not a hobbyist project.

Verdict

Use Medusa if you are building a store where the economics of Shopify's fees become significant, where you need checkout behavior that a hosted platform would not allow, or where you want an AI agent to have API-level access to your entire commerce stack without going through a third-party integration layer.

The setup requires more than clicking a sign-up button. You need a server, a PostgreSQL database, and some environment configuration. That barrier was once prohibitive for non-technical operators. With an AI agent to execute the steps, it is closer to a planning task than a technical one: decide on your hosting provider, supply the API keys, and tell your agent to run the installer.

Medusa is not a replacement for Shopify if your priority is zero-setup speed. It is a replacement for Shopify if your priority is zero ongoing platform fees, full control over the checkout experience, and the ability to treat your entire commerce stack as an API that your agents and internal tools can call directly.

At 35,470 GitHub stars and an MIT license with no strings attached, it is a well-maintained project with a track record long enough to trust with production commerce.

Related posts