Deploy Spree Commerce
Open-source headless commerce: APIs, admin dashboard, marketplace
Just deployed
/rails/storage
Just deployed
/var/lib/postgresql/data
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:
- Open the
spreeservice's Deploy Logs and find "Spree has no admin account yet". - 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. - 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.
Template Content
