← All templates · Websites and shops
Deploy Spree Commerce in one click
An open-source e-commerce platform: products, orders, payments and a headless API for any storefront
A self-hosted alternative to Shopify, BigCommerce, and commercetools.
What is Spree Commerce?
Spree Commerce is an open-source headless e-commerce platform that businesses run instead of Shopify. It is the back office of a shop: a catalog with variants, orders, payments, shipping, promotions and gift cards, all managed in its Admin Dashboard. Markets set the currency, language, payment methods and shipping for each country, and price lists with customer groups handle wholesale. Shoppers never see Spree itself: they buy through a storefront that calls its REST API.
People self-host it to own the code, the data and the checkout, with no fee taken from sales. The core is BSD 3-Clause and built on Ruby on Rails, so a developer can change any part of it. Spree suits a team building its own shop more than someone after a ready theme. The catch is that work: the storefront is a second app to deploy, and no email goes out until an SMTP server is set.
Hosting Spree Commerce on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at Spree Commerce. You fill in what it asks for and click Create project: Email, Admin password.
- In a minute or two Spree Commerce is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about Spree Commerce
Is Spree Commerce free and open source?
Yes. The core is under the BSD 3-Clause license, free to use and change, with no platform or transaction fees. A paid Enterprise Edition adds modules such as multi-tenant SaaS and SSO, plus SLA-backed support.
Does Spree come with a storefront?
Not in its Docker image, which runs the Admin Dashboard and the REST API. Spree's open-source storefront is a separate Next.js app for Vercel, Docker or any Node.js host, or you build your own on the Store API.
Which payment providers does Spree support?
Stripe, Adyen and PayPal, through official plugins that the stock Docker image already includes. With Stripe, the Next.js storefront also takes Apple Pay, Google Pay, Klarna and Affirm. Other gateways can be added with the Payment Provider SDK.
Can I import products into Spree from a CSV file?
Yes. Import on the Products tab takes a CSV, maps its columns to Spree's fields and handles multi-variant products. Exporting the catalog, editing the file and importing it again updates products in bulk, matched by slug.
How do I add staff users to the Spree admin?
In the admin's Users settings, Send Invitation emails a link with a role and an expiry date, and the person creates an account that opens the dashboard. The email goes out only once Spree has an SMTP server configured.
How much memory and disk does Spree Commerce need?
Spree Commerce is moderate: about 650 MB with its Postgres, and product images are what grow on disk. On Pethost the Starter plan is enough for it, with room for other apps beside it.
Spree Commerce Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: spree (ghcr.io/spree/spree:5.6.1), postgres (postgres:18-alpine).
Volumes, in the nightly backup: storage, db.
services:
spree:
image: ghcr.io/spree/spree:5.6.1
restart: unless-stopped
environment:
DATABASE_URL: postgres://spree:${POSTGRES_PASSWORD}@postgres:5432/spree_production
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: ${ENCRYPTION_PRIMARY_KEY}
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: ${ENCRYPTION_DETERMINISTIC_KEY}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: ${ENCRYPTION_KEY_DERIVATION_SALT}
SPREE_HOST: ${HOST}
RAILS_HOST: ${HOST}
# The seed makes the first admin from these instead of a stock account.
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
volumes:
- storage:/rails/storage
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_USER: spree
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: spree_production
volumes:
- db:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U spree -d spree_production"]
interval: 5s
timeout: 5s
retries: 10
volumes:
storage:
db: