Skip to main content
OpenAlternative

Spree Commerce

Open Source

Self-hosted headless commerce with a REST API and Next.js storefront

Alternative to Shopify

Spree Commerce is an open-source headless ecommerce platform with a REST API, a typed TypeScript SDK, and a production-ready Next.js storefront. It covers B2B wholesale portals, multi-vendor marketplaces, and cross-border stores from one self-hosted backend with zero platform fees.

Quick verdict

Spree Commerce is a sound fit for teams that want a self-hosted commerce backend with a REST API and Next.js storefront for B2B, marketplace, or cross-border stores. The tradeoff is operational: hosting is yours to run, and the full enterprise module surface is paid, so managed-checkout merchants should stay on SaaS.

What Spree Commerce ships

  • A production-grade REST API built on OpenAPI 3.0 covers products, carts, checkout, payments, orders, and fulfillments, with flat JSON responses across every commerce operation.

  • A typed TypeScript SDK gives Next.js and React teams autocomplete and type safety against the API, and a production-ready Next.js storefront installs locally with a single command.

  • Login-gated sales channels hide prices and checkout from guests until they hold an account, enforced at the API layer, and a wholesale portal storefront serves repeat B2B buyers with customer pricing and quick ordering.

  • Multi-vendor marketplaces, multi-store brands, and multi-region selling with localized currencies, tax rules, and shipping run from one backend, and the admin dashboard is localized in more than 50 languages.

  • Zero platform fees with full ownership of code, data, and infrastructure remove the transaction-fee compounding Spree attributes to SaaS platforms, and Spree names Shopify and BigCommerce directly as the incumbents its self-hosted model replaces.

Who it fits

  • Teams building B2B or wholesale portals fit well, because custom price lists, buyer organizations, gated channels, and quick ordering are documented as native rather than assembled from plugins.

  • Marketplace operators fit well, because vendors manage their own products while the operator keeps control of payouts, commissions, and quality from a single backend.

  • Enterprise teams leaving SaaS commerce fit well when their requirements center on code ownership, compliance mandates, and deep integrations that hosted platforms do not expose.

Limits to weigh

  • The free core does not include everything: B2B, multi-tenant, and marketplace Enterprise Edition modules, plus the multi-store module, require a commercial or Enterprise License, so the full enterprise surface is paid.

  • Operating Spree means operating infrastructure: the deployment model assumes the adopter provisions hosting, a database, and ongoing maintenance, which is a real staffing commitment compared with managed checkout.

  • Several decision facts remain unconfirmed in the inspected official pages, including SSO availability, managed-cloud hosting beyond a sandbox, offline behavior, and the repository implementation stack, so buyers should verify those directly.

Deployment and integration

Spree runs anywhere containers run, including VPS, PaaS, Kubernetes, and private networks with no phone-home dependencies, on PostgreSQL, MySQL, MariaDB, or SQLite with background jobs stored in the database.

Frontend teams integrate through the REST API or the TypeScript SDK, and scaling stays configurational: extra web instances, split workers, Redis or Valkey caching, and Meilisearch search attach without rearchitecting.

Questions worth asking

What license does Spree Commerce use?

Spree core is BSD-3-Clause software that is free to use, modify, and distribute in commercial projects. Ecosystem packages are MIT licensed, while the multi-store module and Enterprise Edition modules covering B2B, multi-tenant, and marketplace use are sold under separate commercial terms.

How do you self-host Spree Commerce?

Spree ships as a standard Docker image needing one application container and one database, starting at about 1 GB of RAM, and runs on a VPS, PaaS providers, Kubernetes, or on-premise networks. A one-command installer scaffolds a local store for evaluation.

Is Spree Commerce a replacement for Shopify?

Spree officially positions itself as an open-source Shopify alternative for enterprise teams that have outgrown SaaS commerce, citing code ownership, compliance, and deep integrations. That positioning is aimed at teams needing self-hosting and control, not at merchants who want fully managed checkout.

Does Spree Commerce support B2B and marketplaces?

Yes. B2B wholesale portals with login-gated prices and quick ordering, multi-vendor marketplaces, and multi-store and multi-region setups are documented as natively supported models, with the 5.6 release adding gated sales channels and a wholesale portal.

Compared with these products

Similar projects

Related projects with shared categories, technologies, or licensing.

Bagisto

BagistoOpen

Open-source Laravel ecommerce platform for stores and marketplaces

Stars28.2K
Commitjust now
LicenseMIT

Bagisto is an open-source Laravel ecommerce platform for building online stores, multi-vendor marketplaces, and B2B portals.

Saleor

SaleorOpen

Open-source headless commerce backend with a GraphQL API

Stars23.4K
Commitjust now
LicenseBSD-3-Clause

Saleor is an open-source headless commerce backend with a GraphQL-only API and multi-channel catalog control, deployable with Docker or run as managed Cloud.

Appwrite

AppwriteAIOpen

Open source backend with auth, databases, and functions

Stars57.5K
Commitjust now
LicenseBSD-3-Clause

Appwrite is an open source backend platform with auth, databases, storage, functions, and messaging for web and mobile apps.

Medusa

MedusaOpen

Commerce building blocks rather than a fixed storefront

Stars32.4K
Commit2d ago
LicenseMIT

Medusa is a set of commerce modules - cart, orders, pricing, inventory, fulfilment - exposed as APIs you compose, rather than a themed storefront you customise around the edges.

UnoPim

UnoPimAIOpen

Open-source product information platform for central catalog management

Stars11K
Commitjust now
LicenseMIT

UnoPim is a free open-source product information management platform that centralizes, enriches, and distributes product data across channels and locales.

WooCommerce

WooCommerce

Open-source ecommerce plugin for WordPress

Stars10.5K
Commitjust now
LicenseGPL-2.0-or-later

WooCommerce is an open-source ecommerce plugin that turns a WordPress site into a self-hosted online store with payments, shipping, and a REST API.