---
title: "Deploy Vendure"
description: "Headless ecommerce: admin dashboard, worker and Next.js storefront"
category: "Other"
url: https://railway.com/deploy/ecommerce
---

# Deploy Vendure

Headless ecommerce: admin dashboard, worker and Next.js storefront

**[Deploy Vendure on Railway](https://railway.com/template/ecommerce)**

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

- **Creator:** Two Workspaces
- **Category:** Other

## Template content

### Vendure https://raw.githubusercontent.com/two-workspaces/vendure/main/icon.svg

- **Image:** ghcr.io/two-workspaces/vendure:8edf3af
- **Health check:** /health
- **Public domain:** Yes

### Storefront https://raw.githubusercontent.com/two-workspaces/vendure/main/icon.svg

- **Image:** ghcr.io/two-workspaces/vendure-storefront:8edf3af
- **Health check:** /vendure.svg
- **Public domain:** Yes

### Worker https://raw.githubusercontent.com/two-workspaces/vendure/main/icon.svg

- **Image:** ghcr.io/two-workspaces/vendure:8edf3af

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

- **Image:** postgres:17.12-alpine

## Documentation

# Deploy and Host Vendure on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/new/template/ecommerce?referralCode=sLjDXb&utm_medium=integration&utm_source=button&utm_campaign=vendure)

Vendure is an open-source headless commerce platform built with TypeScript, NestJS and GraphQL: a catalog with variants, facets and collections, stock, promotions, shipping, taxes, customers and orders, managed in its React Dashboard and sold through a GraphQL Shop API. This template runs Vendure 3.8.2 on Railway as a working shop: the server with the Dashboard, the background worker, Vendure's official Next.js storefront and Postgres, with demo products on the first boot.

This is a community template, not made or supported by Vendure GmbH.

## About Hosting Vendure

Deploy, then give the first boot a minute or two: the Vendure service creates the tables and the demo shop before it answers, and the Worker and Storefront wait for it.

- **Dashboard:** open the Vendure service's domain at `/dashboard` and sign in as `superadmin` with the generated `SUPERADMIN_PASSWORD` from the service's Variables tab. Vendure's well-known default password is refused at boot.
- **Storefront:** the Storefront service's domain, with search, customer accounts, cart and checkout in English and German.
- **APIs:** `/shop-api` and `/admin-api` on the Vendure service, for your own storefront, app or integration.

**The demo data:** 54 products in 9 collections, with prices in US dollars. Set `VENDURE_SEED_DEMO=false` on the Vendure service before the first deploy to start without products; countries, taxes and shipping methods are still set up.

**Payments:** checkout works out of the box with Vendure's dummy payment method, which records a payment and charges nobody. Before you sell anything, replace it: Vendure's payments plugin covers Stripe, Mollie and Braintree, and adding a plugin means changing the code (see below).

**Email:** set `SMTP_HOST` and the other SMTP variables on the Vendure service and redeploy to send order and account emails. Until then nothing is sent, and customers can sign up without confirming their address. Setting `SMTP_HOST` turns that confirmation on.

**Adding plugins and custom fields:** Vendure is extended in code. Fork the [template source](https://github.com/two-workspaces/vendure), add your plugins to `src/vendure-config.ts` and a migration for schema changes, then point the Vendure and Worker services at your fork.

**Memory:** in testing the Vendure service used about 320 MB (354 MB at its peak, during the first boot), the Worker about 100 MB, the Storefront about 95 MB and Postgres about 75 MB, with every service capped at 0.5 GB. Give the Vendure service 1 GB or more for real traffic.

**Your data:** products, customers and orders are in the Postgres service's volume. Uploaded images are on the Vendure service's volume at `/app/static`. Redeploys keep both.

**Custom domains:** for the server, add the domain to the Vendure service (port 3000) and set its `VENDURE_URL`. For the shop, add it to the Storefront service (port 3001), then set `NEXT_PUBLIC_SITE_URL` there and `STOREFRONT_URL` on the Vendure service. Redeploy after changing them; no rebuild is needed.

## Common Use Cases

- An online shop you own, with no platform fee per order
- A headless commerce backend for your own web or mobile storefront, through GraphQL
- A B2B catalog with customer groups, promotions and several sales channels
- A starting point for a custom TypeScript commerce project, with the server, worker and storefront already wired together
- Trying out Vendure's Dashboard and APIs with real data before building on it

## Dependencies for Vendure Hosting

- Postgres 17 (included)
- An SMTP server for order and account emails (optional)
- A payment provider such as Stripe or Mollie, added as a plugin, before taking real payments

### Deployment Dependencies

- [Vendure on GitHub](https://github.com/vendurehq/vendure)
- [Vendure documentation](https://docs.vendure.io)
- [Next.js storefront starter](https://github.com/vendurehq/nextjs-starter-vendure)
- [Template source](https://github.com/two-workspaces/vendure)

### Implementation Details

- **Services:** Vendure (server, APIs, Dashboard and images), Worker (the same image, running the job queue: search index, collections, emails), Storefront (Next.js) and Postgres 17. Postgres is reachable only on Railway's private network.
- **Images:** built by this repo's GitHub Actions from Vendure's own scaffold (what `npx @vendure/create` generates) and its official storefront starter, pinned, so a deploy pulls finished images instead of building on Railway.
- **One image for every domain:** the storefront is built with placeholder addresses, and each boot writes your deploy's values into a fresh copy.
- **Migrations:** the database is created and upgraded by migrations at start, never by schema synchronization.
- **Interrupted first boot:** if the first setup is cut off, the next boot starts it again from an empty database. This only happens before the setup has finished once.
- **Fresh content:** the starter caches menus and products for hours or days and expects a webhook to clear them. Here the cache lasts about a minute, so edits in the Dashboard show up by themselves.
- **Safer defaults:** GraphiQL is left out, cross-site request forgery protection is on, and only your storefront's address may call the APIs from a browser (`CORS_ORIGINS` takes a comma-separated list instead).
- **License:** Vendure is GPLv3 (or a commercial license from Vendure GmbH), and so is this template's source. The storefront starter is MIT.

## Why Deploy Vendure 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 Vendure 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)
- [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/ecommerce
