---
title: "Deploy Spree Commerce"
description: "Open-source headless commerce: APIs, admin dashboard, marketplace"
category: "Other"
url: https://railway.com/deploy/spree-commerce
---

# Deploy Spree Commerce

Open-source headless commerce: APIs, admin dashboard, marketplace

**[Deploy Spree Commerce on Railway](https://railway.com/template/spree-commerce)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/spree-commerce/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### spree https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/spree.png

- **Source:** https://github.com/aalfath/spree-railway-template
- **Health check:** /up
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host Spree Commerce on Railway

Spree Commerce is an open-source (BSD-3-Clause) headless commerce platform built on Ruby on Rails. It gives you REST Store and Admin APIs, a React admin dashboard, TypeScript SDKs, webhooks and a built-in marketplace mode, for direct-to-consumer, B2B and multi-vendor stores with no platform fees.

## About Hosting Spree Commerce

This template deploys Spree 6.0.5 from the official image, pinned by version and digest, plus a Railway Postgres database. One `spree` service runs Puma, serving the admin dashboard, the APIs and the `/jobs` dashboard, with Solid Queue background jobs inside the same process. Postgres holds the catalogue, orders, job queue and cache, and a volume keeps uploaded product images. Every key is generated at deploy, and there's no default admin. After the first deploy, open the service's Deploy Logs and follow the one-time setup link to create your admin account and store. It stops working as soon as an admin exists.

## Common Use Cases

* Run a headless online store behind your own Next.js storefront, mobile app or the Spree storefront starter
* Sell B2B with customer groups, price lists, company accounts and per-country markets
* Run a multi-vendor marketplace with seller onboarding and payouts

## Dependencies for Spree Commerce Hosting

* PostgreSQL (Railway Postgres, included)
* A volume for uploaded images and files (included)

### Deployment Dependencies

* Spree Commerce release: https://github.com/spree/spree/releases/tag/v6.0.5
* Official image: https://github.com/spree/spree/pkgs/container/spree
* Template repo: https://github.com/aalfath/spree-railway-template
* Spree deployment docs: https://spreecommerce.org/docs/developer/deployment/docker

### Implementation Details

After deploy:

1. Open the `spree` service's Deploy Logs and find "Spree has no admin account yet".
2. Open the link printed below it (`https://YOUR-DOMAIN/dashboard/setup?token=...`), then enter your email, password, store name and the country you sell from.
3. Sign in at `https://YOUR-DOMAIN/dashboard`.

The `/jobs` dashboard uses the user `jobs` and the generated `MISSION_CONTROL_PASSWORD` from the service's variables.

Optional settings go in the service's variables. Add `SMTP_HOST`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD` and `SMTP_FROM_ADDRESS` to send email (without them, emails only go to the logs). Set `SPREE_HOST` for a custom domain. S3-compatible storage and Meilisearch search are covered in the repo README.

Updates: the service builds from the template's GitHub repo. When a new Spree version lands there, Railway shows you an "update available" notice, and you choose when to apply it. Database migrations run on the next boot. Read the repo's CHANGELOG.md first.

## Why Deploy Spree Commerce 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 Spree Commerce on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/spree-commerce
