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

The fastest path is the Railway template, which deploys the unchained-app starter together with a MongoDB service via a one-click deploy button. For container-based deployments on your own infrastructure, see Docker Deployment.

Production Requirements​

Infrastructure​

  • Node.js 26+ - Runtime environment
  • MongoDB - Primary database (MONGO_URL; in development the engine falls back to an in-memory server when unset)
  • File Storage - MinIO/S3 or GridFS (MongoDB built-in) for media
  • Redis (optional) - For distributed events

Environment Variables​

startPlatform exits at boot if any of these are missing:

ROOT_URL=https://api.myshop.com
UNCHAINED_TOKEN_SECRET=your-32-char-secret-minimum
EMAIL_WEBSITE_NAME=My Shop
EMAIL_WEBSITE_URL=https://myshop.com
EMAIL_FROM=noreply@myshop.com

Additionally for production:

NODE_ENV=production
MONGO_URL=mongodb://...
MAIL_URL=smtp://... # emails cannot be sent without it

# File storage (when using the MinIO plugin)
MINIO_ENDPOINT=https://s3.amazonaws.com # full URL
MINIO_ACCESS_KEY=...
MINIO_SECRET_KEY=...
MINIO_BUCKET_NAME=my-shop-files

See Environment Variables for the canonical reference; plugin-specific variables (MinIO, Stripe, ...) are documented with their plugins.

Architecture Recommendations​

Basic Setup​

Production Setup​

The Admin UI is served by the engine itself (connect(fastify, platform, { adminUI: true })) — it needs no separate deployment.

Guides​