Railway

Deploy Saleor | Most Advanced Open Ecommerce Platform

Self Host Saleor. Headless commerce with dashboard, GraphQL, API & more

Deploy Saleor | Most Advanced Open Ecommerce Platform

Saleor Backend

Saleor-Scheduler

saleor/saleor:3.23

Just deployed

Saleor-Worker

saleor/saleor:3.23

Just deployed

Database

/var/lib/postgresql/data

Just deployed

/data

Just deployed

/app/media

Just deployed

Saleor logo

Deploy and Host Saleor on Railway

Saleor is an open-source headless e-commerce platform built on Python, Django, and GraphQL. It handles products, orders, payments, and multi-channel selling through a composable API-first architecture.

Deploy Saleor on Railway to self-host a production-ready commerce backend. This template pre-configures Saleor-API (GraphQL backend with migrations and admin bootstrap), Saleor-Worker (Celery background tasks), Saleor-Scheduler (Celery Beat periodic jobs), Saleor-Dashboard (admin UI), PostgreSQL, and Redis.

Saleor Railway architecture

Getting Started with Saleor on Railway

After deploy (first boot runs ~200 migrations, takes 3-5 minutes), open the Saleor-Dashboard URL. Log in with DJANGO_SUPERUSER_EMAIL and DJANGO_SUPERUSER_PASSWORD -- the admin account is created automatically via the startCommand.

First, create a Channel (e.g. "Default Channel" with currency USD) -- channels are required before adding products or processing orders. Then add a Product Type, create your first Product, and configure Shipping Zones. For payments, install a gateway app through the Apps section.

Connect a storefront by pointing any frontend (Next.js, Nuxt, Remix) at the /graphql/ endpoint.

Saleor dashboard screenshot

About Hosting Saleor

Saleor is a headless commerce engine -- the API and admin dashboard are decoupled from the storefront. With 21k+ GitHub stars and SOC 2 / GDPR / PCI-DSS compliance, it powers stores at international scale.

  • GraphQL-native API -- every feature through a single endpoint
  • Multi-channel selling -- web, mobile, retail, and marketplace from one backend
  • Extensible apps system -- webhooks, callbacks, and dashboard iframes
  • Multi-currency and multi-language -- built-in internationalization
  • Granular permissions -- RBAC with per-channel access control
  • Payment integrations -- Stripe, Adyen, Mollie, and custom gateways

Why Deploy Saleor on Railway

  • Zero-ops commerce backend -- API, workers, and dashboard with no server management
  • Automatic TLS -- HTTPS out of the box for API and Dashboard
  • Private networking -- Postgres and Redis on Railway's internal network
  • Independent scaling -- scale API and Worker replicas separately
  • Full data ownership -- products, orders, and customer data on your infrastructure

Common Use Cases for Saleor

  • Custom storefront development -- headless store with Next.js, Nuxt, or any frontend backed by Saleor's GraphQL API
  • Multi-channel commerce -- B2B and B2C sales, marketplaces, and retail POS from a single backend
  • International e-commerce -- per-channel pricing, currencies, and tax rules across countries
  • Composable commerce stack -- pair Saleor with a headless CMS, search engine, and payment providers

Dependencies for Saleor on Railway

  • Saleor-API (ghcr.io/saleor/saleor:3.23) -- GraphQL commerce backend, port 8000
  • Saleor-Worker (ghcr.io/saleor/saleor:3.23) -- Celery background task processor
  • Saleor-Scheduler (ghcr.io/saleor/saleor:3.23) -- Celery Beat periodic task scheduler (single instance only)
  • Saleor-Dashboard (ghcr.io/saleor/saleor-dashboard:3.23) -- admin UI, port 80
  • PostgreSQL -- Railway-managed relational database
  • Redis -- Railway-managed cache and message broker

Environment Variables Reference for Saleor on Railway

VariableServiceDescription
SECRET_KEYAPIDjango secret key for signing
DATABASE_URLAPI, Worker, SchedulerPostgreSQL connection string
CELERY_BROKER_URLAPI, Worker, SchedulerRedis URL for Celery task queue
RSA_PRIVATE_KEYAPIJWT signing key (generate with openssl)
ALLOWED_HOSTSAPIPermitted HTTP host headers
ALLOWED_CLIENT_HOSTSAPI, Worker, SchedulerDashboard origin (required when DEBUG=False)
PUBLIC_URLAPIPublic-facing API URL with https://
DASHBOARD_URLAPIDashboard URL for email links
API_URLDashboardGraphQL endpoint URL
DJANGO_SUPERUSER_EMAILAPIAdmin email for bootstrap
DJANGO_SUPERUSER_PASSWORDAPIAdmin password for bootstrap

Deployment Dependencies for Saleor

Hardware Requirements for Self-Hosting Saleor

ResourceMinimumRecommended
CPU2 vCPU4 vCPU
RAM4 GB (total across services)6 GB
Storage2 GB (base)10+ GB (media uploads)
RuntimePython 3.12, Node.js 18Latest stable

On Railway, allocate 2 GB to the API, 1 GB to the Worker, and 512 MB each to the Scheduler and Dashboard.

Self-Hosting Saleor with Docker Compose

Clone the official platform repository:

git clone https://github.com/saleor/saleor-platform.git --recursive --jobs 3
cd saleor-platform

Create a docker-compose override for production:

services:
  api:
    image: ghcr.io/saleor/saleor:3.23
    ports:
      - "8000:8000"
    environment:
      DATABASE_URL: postgres://saleor:saleor@db:5432/saleor
      CELERY_BROKER_URL: redis://redis:6379/1
      CACHE_URL: redis://redis:6379/0
      SECRET_KEY: your-secret-key-here
      ALLOWED_HOSTS: localhost,127.0.0.1
      DEBUG: "False"
    depends_on:
      - db
      - redis
  worker:
    image: ghcr.io/saleor/saleor:3.23
    command: celery --app saleor.celeryconf:app worker -E --loglevel=info
    environment:
      DATABASE_URL: postgres://saleor:saleor@db:5432/saleor
      CELERY_BROKER_URL: redis://redis:6379/1
      SECRET_KEY: your-secret-key-here
    depends_on:
      - db
      - redis
  dashboard:
    image: ghcr.io/saleor/saleor-dashboard:3.23
    ports:
      - "9000:80"
  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: saleor
      POSTGRES_USER: saleor
      POSTGRES_PASSWORD: saleor
    volumes:
      - pgdata:/var/lib/postgresql/data
  redis:
    image: redis:7-alpine
    volumes:
      - redisdata:/data
volumes:
  pgdata:
  redisdata:

How Much Does Saleor Cost to Self-Host?

Saleor Core is free and open-source under the BSD-3-Clause license with no seat limits or transaction fees. Saleor Cloud starts at $159/month, but self-hosting on Railway means you only pay for infrastructure. A typical deployment costs $10-25/month depending on traffic.

Saleor FAQ

What is Saleor and why should I self-host it on Railway? Saleor is an open-source headless e-commerce platform with a GraphQL API, admin dashboard, and background workers. Self-hosting on Railway gives you full data ownership, no per-transaction fees, and zero vendor lock-in.

What does this Railway template deploy for Saleor? Six services: Saleor-API (GraphQL backend), Saleor-Worker (Celery tasks), Saleor-Scheduler (Celery Beat), Saleor-Dashboard (admin UI), PostgreSQL, and Redis. All pre-configured and connected via Railway's private network.

Why does Saleor on Railway need both PostgreSQL and Redis? PostgreSQL stores persistent commerce data (products, orders, customers). Redis serves as the Celery message broker for background tasks and the Django cache backend.

How do I connect a storefront to self-hosted Saleor on Railway? Point your frontend's GraphQL client at https:///graphql/. Use Next.js, Nuxt, Remix, or any framework. Saleor provides starters at github.com/saleor/storefront.

Why is ALLOWED_CLIENT_HOSTS required on Worker and Scheduler? Saleor validates ALLOWED_CLIENT_HOSTS at Django settings import time. When DEBUG=False, every process loading settings (including Celery) crashes if this variable is missing.

How do I generate the RSA_PRIVATE_KEY for Saleor on Railway? Run openssl genrsa 2048, then convert the output to a single line by replacing newlines with \n. Set it on the API and reference from Worker/Scheduler via ${{Saleor-API.RSA_PRIVATE_KEY}}.

Can I use S3 storage with self-hosted Saleor instead of volumes? Yes. Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_MEDIA_BUCKET_NAME, and AWS_S3_ENDPOINT_URL on the API service. Recommended for production.


Template Content

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

Shahed Nasser