Skip to main content

Deployment

This section covers deploying Unchained Engine to production environments.

Deployment Options

PlatformComplexityBest For
RailwayLowQuick setup, managed infrastructure
DockerMediumCustom infrastructure, Kubernetes
ManualHighFull control, existing infrastructure

Quick Start: Railway

The fastest way to deploy Unchained Engine:

# Create project and deploy to Railway
npm init @unchainedshop -- --template railway

See Railway Deployment for details.

Docker Deployment

For container-based deployments:

# Build and run with Docker
docker build -t my-shop .
docker run -p 4010:4010 my-shop

See Docker Deployment for details.

Production Requirements

Infrastructure

  • Node.js 22+ - Runtime environment
  • MongoDB 6+ - Primary database
  • File Storage - S3, MinIO, or GridFS for media
  • Redis (optional) - For distributed events and caching

Environment Variables

Essential production variables:

# Required
NODE_ENV=production
ROOT_URL=https://api.myshop.com
MONGO_URL=mongodb://...
UNCHAINED_TOKEN_SECRET=your-32-char-secret-minimum

# File Storage (when using MinIO plugin)
MINIO_ENDPOINT=s3.amazonaws.com
MINIO_ACCESS_KEY=...
MINIO_SECRET_KEY=...
MINIO_BUCKET=my-shop-files

# Email
MAIL_URL=smtp://...
EMAIL_FROM=noreply@myshop.com
EMAIL_WEBSITE_NAME=My Shop

See Environment Variables for complete list.

Architecture Recommendations

Basic Setup

Production Setup

Guides