---
title: "Deploy Sylius"
description: "Open-source eCommerce platform for building custom online stores"
category: "Other"
url: https://railway.com/deploy/sylius
---

# Deploy Sylius

Open-source eCommerce platform for building custom online stores

**[Deploy Sylius on Railway](https://railway.com/template/sylius)**

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

- **Creator:** A3A
- **Category:** Other

## Template content

### worker https://raw.githubusercontent.com/Sylius/Sylius/2.2/src/Sylius/Bundle/AdminBundle/Resources/assets/images/sylius-logo.svg

- **Source:** https://github.com/gridalpha/sylius-railway

### scheduler https://raw.githubusercontent.com/Sylius/Sylius/2.2/src/Sylius/Bundle/AdminBundle/Resources/assets/images/sylius-logo.svg

- **Source:** https://github.com/gridalpha/sylius-railway

### Redis https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### mailpit https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg

- **Image:** axllent/mailpit:latest
- **Health check:** /livez
- **Public domain:** Yes

### MySQL https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mysql.svg

- **Image:** mysql:9.4
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

### sylius https://raw.githubusercontent.com/Sylius/Sylius/2.2/src/Sylius/Bundle/AdminBundle/Resources/assets/images/sylius-logo.svg

- **Source:** https://github.com/gridalpha/sylius-railway
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Sylius on Railway

Sylius is an open-source eCommerce platform built on Symfony and API Platform. It gives developers a real commerce domain model — channels, catalogues, promotions, taxes, shipping, payments and orders — as an application you own outright rather than a product you rent. Agencies and in-house teams pick it when a store needs behaviour a SaaS checkout will not bend to: multi-channel pricing, B2B rules, custom fulfilment, or a headless front end on the bundled REST API. Deploy Sylius on Railway and you get the storefront, the admin panel and the API on one domain, with persistence and background processing already wired up.

This template runs Sylius the way its own documentation describes for production. The `sylius` service serves the storefront and admin through nginx and PHP-FPM. A separate `worker` service consumes the Symfony Messenger queues, so catalogue promotions and other deferred work never block a shopper's request. A `scheduler` service runs Sylius' recurring maintenance commands. `MySQL` stores the catalogue and orders, `Redis` holds the application cache and shopper sessions, and `mailpit` captures every outgoing email so you can read order confirmations before wiring a real SMTP relay.

![Sylius web, worker and scheduler over MySQL, Redis and Mailpit](https://res.cloudinary.com/rroe4rtk/image/upload/v1788452735/sylius-architecture.png)

## Getting Started with Sylius on Railway

Set `SYLIUS_ADMIN_EMAIL` and `SYLIUS_ADMIN_PASSWORD` before you deploy — those become the first administrator, and no default account is left behind. The first boot runs migrations, seeds a channel, currency and locale, generates the API JWT keypair and the payment encryption key, and loads the demo catalogue. That takes a few minutes; watch the `sylius` log until it prints `starting php-fpm and nginx`.

Open the public URL and you land on a storefront already populated with categories and products. Sign in at `/admin` with the email and password you set. Go to **Catalog → Products** to edit or delete the samples, then **Configuration → Channels** to rename the shop and set your currency. To confirm the deployment end to end, add a product to the cart and check the order reaches **Sales → Orders**. Set `SYLIUS_SAMPLE_DATA` to `false` before the first deploy to start with an empty catalogue.

![Sylius storefront homepage with the new collection banner](https://res.cloudinary.com/rroe4rtk/image/upload/v1788452737/sylius-storefront.png)
![Sylius T-shirts category listing with product photos](https://res.cloudinary.com/rroe4rtk/image/upload/v1788452741/sylius-catalog.png)
![Sylius shopping cart holding a T-shirt with its price](https://res.cloudinary.com/rroe4rtk/image/upload/v1788452738/sylius-cart.png)
![Sylius admin dashboard showing sales and order statistics](https://res.cloudinary.com/rroe4rtk/image/upload/v1788452739/sylius-admin-dashboard.png)
![Sylius admin order grid listing twenty placed orders](https://res.cloudinary.com/rroe4rtk/image/upload/v1788452740/sylius-admin-orders.png)

## About Hosting Sylius

Sylius is a framework as much as a product. The order state machine, the pricing engine and the admin grids are all Symfony services you can decorate or replace, which is why teams choose it over a plugin-driven platform when requirements are unusual. Self-hosting is the point: your catalogue, customer data and payment configuration stay in a database you control, with no per-order fee between you and your revenue.

Key capabilities:

- Multi-channel, multi-currency selling with per-channel catalogues and pricing
- A promotions engine covering catalogue promotions and coupon rules
- A REST API with JWT auth, for headless storefronts and mobile apps
- Taxation, shipping and payment methods configured per channel and zone
- An admin panel built on Symfony UX, Live Components and Twig
- First-party Stripe, PayPal, Adyen and Mollie payment plugins

The Railway architecture splits Sylius into the roles its production guide recommends. The web role handles HTTP. The worker runs `messenger:consume` on the `main` and `catalog_promotion_removal` transports, which recalculates prices when a catalogue promotion changes. The scheduler cancels unpaid orders and clears abandoned carts hourly, work that would normally be a cron entry. All three run the same image over MySQL and Redis.

## Why Deploy Sylius on Railway

Railway removes the infrastructure work that usually surrounds a Symfony commerce stack.

- MySQL and Redis provisioned and connected, no connection strings to copy
- Private networking between the web, worker and scheduler roles
- A persistent volume for product media and generated keys
- HTTPS and a public domain on first deploy
- Logs and metrics for every role in one place

## Common Use Cases

- A B2C store whose checkout, pricing or fulfilment rules do not fit a hosted platform
- A B2B portal with customer-group pricing and account-specific catalogues
- A headless backend serving a Next.js or mobile storefront through the Sylius API
- A multi-brand setup running several channels and locales from one admin

## Dependencies for Sylius

- **sylius** — the storefront, admin panel and API, built from `Sylius/Sylius-Standard` on `ghcr.io/sylius/sylius-php:8.3-alpine`
- **worker** — the same image running the Symfony Messenger consumer
- **scheduler** — the same image running Sylius' recurring maintenance commands
- **MySQL** — `mysql:9.4`, the catalogue, customers and orders
- **Redis** — `redis:8.2`, the Symfony cache pool and shopper sessions
- **mailpit** — `axllent/mailpit:latest`, an SMTP sink with a web inbox

Redis matters more than it looks: Railway replaces the container on every deploy, so file-based sessions would empty every cart.

### Environment Variables Reference

| Variable | Purpose |
|---|---|
| `SYLIUS_ADMIN_EMAIL` | Email of the administrator created on first boot |
| `SYLIUS_ADMIN_PASSWORD` | Password for that administrator |
| `SYLIUS_SAMPLE_DATA` | `true` loads the demo catalogue once; `false` starts empty |
| `APP_SECRET` | Symfony signing secret; changing it invalidates sessions |
| `MAILER_DSN` | SMTP endpoint; point it at your relay to send real mail |
| `SYLIUS_SCHEDULER_INTERVAL` | Seconds between scheduler passes, default `3600` |
| `TRUSTED_PROXIES` | Proxy ranges Symfony trusts for the real client IP |

### Deployment Dependencies

- Source repository: https://github.com/gridalpha/sylius-railway
- Upstream project: https://github.com/Sylius/Sylius
- Application skeleton: https://github.com/Sylius/Sylius-Standard
- Documentation: https://docs.sylius.com
- Runtime: PHP 8.3, Symfony 7.4, Node 22 for the asset build

## Hardware Requirements for Self-Hosting Sylius

| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2–4 vCPU |
| RAM | 1 GB for the web role | 2 GB web, 512 MB each for worker and scheduler |
| Storage | 5 GB volume for media | 10 GB+ as the catalogue grows |
| Database | MySQL 8.0+ | MySQL 9.4 with 1 GB RAM |
| Runtime | PHP 8.3, MySQL, Redis | Same, plus a real SMTP relay |

Symfony's cache warmup is the peak memory moment; PHP's limit is set to 512 MB for it.

## Self-Hosting Sylius

Sylius publishes no ready-made application image: the deployable artifact is your own project, built from the skeleton. Composer creates it locally:

```
composer create-project sylius/sylius-standard my-store
cd my-store
yarn install && yarn build:prod
bin/console sylius:install -s default
```

Upstream also ships a Docker Compose environment for development, which pulls the same PHP-FPM base image this template builds on:

```
git clone https://github.com/Sylius/Sylius-Standard.git
cd Sylius-Standard
make init
```

This template's image does the equivalent at build time — Composer install plus a Webpack Encore build — then runs migrations and first-boot setup at startup.

## Is Sylius Free to Self-Host?

Sylius is open source under the MIT licence, so there are no per-order or per-seat fees. Sylius Plus is a paid edition adding multi-source inventory, RBAC and returns management, but the open-source edition is a complete store on its own. On Railway you pay only for the compute, database and storage the services use.

## FAQ

**What is Sylius?**
An open-source eCommerce platform built on Symfony and API Platform, providing a storefront, an admin panel and a REST API, designed to be extended in PHP rather than configured through plugins.

**What does this Railway template deploy?**
Six services: the Sylius web application, a Messenger worker, a scheduler, MySQL, Redis and Mailpit. Only the web service and the Mailpit inbox are public; everything else stays on the private network.

**Why does the template include Redis?**
Redis holds the Symfony cache pool and shopper sessions. Railway recreates the container on every deploy, so disk-based sessions would empty every cart; Redis makes deploys invisible to customers.

**How do I send real order confirmation emails from self-hosted Sylius?**
Set `MAILER_DSN` on the `sylius`, `worker` and `scheduler` services to your provider's SMTP DSN, such as `smtp://user:pass@smtp.example.com:587`. Until then Mailpit captures everything in its own web inbox.

**How do I use the Sylius API on Railway?**
The API lives under `/api/v2` on the same domain. Post your administrator credentials to `/api/v2/admin/authentication-token` for a token; the JWT keypair is generated on first boot and kept on the volume, so tokens survive redeploys.

**Can I attach a custom domain to a self-hosted Sylius store?**
Yes. Add the domain in Railway, then set the channel hostname to match under **Configuration → Channels** — Sylius resolves the channel from the request host.

**How do I remove the sample products?**
Delete them under **Catalog → Products** in the admin, or set `SYLIUS_SAMPLE_DATA` to `false` before the first deploy so the demo catalogue is never loaded.


## 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) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/sylius
