
Deploy Saleor Backend with Storefront
Saleor backend services - API, Dashboard, Worker & Scheduler with Store
saleor-api
saleor/saleor:3.21
Just deployed
Redis
bitnami/redis:7.2.5
Just deployed
/bitnami
saleor-dashboard
saleor/saleor-dashboard:latest
Just deployed
Postgres
railwayapp-templates/postgres-ssl:16
Just deployed
/var/lib/postgresql/data
saleor-worker
saleor/saleor:3.21
Just deployed
saleor-scheduler
saleor/saleor:3.21
Just deployed
storefront
saleor/storefront
Just deployed
Deploy and Host Saleor Backend with Storefront on Railway
What is Saleor Backend with Storefront? Saleor is an open-source, headless commerce platform (Django + GraphQL). This template deploys the core API plus Celery worker/scheduler, the Saleor Dashboard (admin), and the classic Saleor Storefront—wired to Postgres and Redis—so you get a full, production-style stack in minutes.
About Hosting Saleor Backend with Storefront
A typical Saleor deployment consists of multiple services: the API (Django/GraphQL), a Celery worker for background jobs, a Celery beat/scheduler, Redis for queues/cache, Postgres for data, the Dashboard for admin, and a Storefront for a ready-to-use web shop. You’ll configure environment variables, attach persistent storage for Postgres, and (for production) connect object storage for media and an SMTP service for email. Domains/HTTPS, SSO, and observability can be added later as you grow.
Common Use Cases
- Launch a proof-of-concept or MVP store with a managed Postgres/Redis and a prewired frontend
- Evaluate Saleor’s GraphQL API and Dashboard with a real, multi-service setup
- Stand up a production-ready base, then bring your own custom Storefront/Apps later
Dependencies for Saleor Backend with Storefront Hosting
- Infrastructure: Postgres (v13+), Redis (v6+), persistent volume for DB
- External services (for production): S3-compatible object storage for media, SMTP email provider, custom domain & TLS
Deployment Dependencies
Helpful docs & references:
- Saleor Overview: https://docs.saleor.io/
- Saleor Deployment/Running (Docker & envs): https://docs.saleor.io/docs/developer/running/
- Saleor Configuration (env vars): https://docs.saleor.io/docs/developer/configuration/
- Saleor Dashboard: https://github.com/saleor/saleor-dashboard
- Saleor Storefront (classic): https://github.com/saleor/storefront
Environment variables you’ll set ( Railway maps DATABASE_URL
/ REDIS_URL
automatically ):
SECRET_KEY
– Django secretALLOWED_HOSTS
– your domain(s)DATABASE_URL
– PostgreSQL connection stringREDIS_URL
– Redis connection stringDEFAULT_FROM_EMAIL
,EMAIL_URL
– SMTP configurationMEDIA_ROOT
/ S3 vars for media (e.g.,AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_STORAGE_BUCKET_NAME
,AWS_S3_ENDPOINT_URL
)DASHBOARD_URL
,STOREFRONT_URL
,ALLOWED_CLIENT_HOSTS
– for CORS and links from emails
Implementation Details
Example .env
sketch you can adapt on Railway:
SECRET_KEY=generate-a-strong-secret
ALLOWED_HOSTS=yourdomain.com,.yourdomain.com
DATABASE_URL=${{ Postgres.DATABASE_URL }}
REDIS_URL=${{ Redis.REDIS_URL }}
# Email (e.g., Mailgun/Sendgrid)
DEFAULT_FROM_EMAIL=Shop
EMAIL_URL=smtp://USER:[email protected]:587
# S3-compatible storage (MinIO, AWS S3, etc.)
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_STORAGE_BUCKET_NAME=saleor-media
AWS_S3_ENDPOINT_URL=https://s3.your-provider.com
# Client URLs
DASHBOARD_URL=https://dashboard.yourdomain.com
STOREFRONT_URL=https://shop.yourdomain.com
ALLOWED_CLIENT_HOSTS=shop.yourdomain.com,dashboard.yourdomain.com
Services in this template:
- saleor-api (Django/GraphQL)
- saleor-worker (Celery)
- saleor-scheduler (Celery beat)
- saleor-dashboard (admin UI)
- storefront (classic Saleor Storefront)
- redis, postgres
Why Deploy Saleor Backend with Storefront on Railway?
Railway is a singular platform to deploy your infrastructure stack. By deploying Saleor Backend with Storefront on Railway, you are one step closer to supporting a complete full-stack application with minimal burden.
Template Content
saleor-api
ghcr.io/saleor/saleor:3.21PUBLIC_URL
Specifies the base URL at which Saleor is hosted
SECRET_KEY
Controls Django's secret key setting.
ALLOWED_HOSTS
This variable controls Django's allowed hosts setting. It defaults to localhost.
AWS_ACCESS_KEY_ID
Your AWS/R2 access key.
CELERY_BROKER_URL
Default task broker URL. You can read more about configuring this at Celery Documentation.
AWS_S3_ENDPOINT_URL
ALLOWED_CLIENT_HOSTS
A list of strings representing host/domain names of client applications (storefront or dashboard) that use this Saleor instance as a backend.
AWS_QUERYSTRING_AUTH
AWS_MEDIA_BUCKET_NAME
The S3/R2 bucket name to use for the media files.
AWS_SECRET_ACCESS_KEY
Your AWS/R2 secret access key.
AWS_MEDIA_CUSTOM_DOMAIN
The custom domain to use for the media bucket.
Redis
bitnami/redis:7.2.5saleor-dashboard
ghcr.io/saleor/saleor-dashboard:latestEXTENSIONS_API_URL
URI of Marketplace API to fetch list of Extensions in JSON.
APPS_MARKETPLACE_API_URL
URI of Marketplace API to fetch list of Apps in JSON.
saleor-worker
ghcr.io/saleor/saleor:3.21PUBLIC_URL
Specifies the base URL at which Saleor is hosted
SECRET_KEY
Controls Django's secret key setting.
ALLOWED_HOSTS
This variable controls Django's allowed hosts setting. It defaults to localhost.
AWS_ACCESS_KEY_ID
Your AWS/R2 access key.
CELERY_BROKER_URL
Default task broker URL. You can read more about configuring this at Celery Documentation.
ALLOWED_CLIENT_HOSTS
A list of strings representing host/domain names of client applications (storefront or dashboard) that use this Saleor instance as a backend.
AWS_MEDIA_BUCKET_NAME
The S3/R2 bucket name to use for the media files.
AWS_SECRET_ACCESS_KEY
Your AWS/R2 secret access key.
AWS_MEDIA_CUSTOM_DOMAIN
The custom domain to use for the media bucket.
saleor-scheduler
ghcr.io/saleor/saleor:3.21PUBLIC_URL
Specifies the base URL at which Saleor is hosted
SECRET_KEY
Controls Django's secret key setting.
ALLOWED_HOSTS
This variable controls Django's allowed hosts setting. It defaults to localhost.
AWS_ACCESS_KEY_ID
Your AWS/R2 access key.
CELERY_BROKER_URL
Default task broker URL. You can read more about configuring this at Celery Documentation.
AWS_S3_ENDPOINT_URL
ALLOWED_CLIENT_HOSTS
A list of strings representing host/domain names of client applications (storefront or dashboard) that use this Saleor instance as a backend.
AWS_QUERYSTRING_AUTH
AWS_MEDIA_BUCKET_NAME
The S3/R2 bucket name to use for the media files.
AWS_SECRET_ACCESS_KEY
Your AWS/R2 secret access key.
AWS_MEDIA_CUSTOM_DOMAIN
The custom domain to use for the media bucket.
storefront
saleor/storefrontSALEOR_APP_TOKEN
Token used for fetching channels
NEXT_PUBLIC_SALEOR_API_URL
Replace URL with your Saleor backend. Make sure to keep the slash at the end.
NEXT_PUBLIC_STOREFRONT_URL
Make sure to add it on production for correct canonical URLs