Deployment
This section covers deploying Unchained Engine to production environments.
Deployment Options
| Platform | Complexity | Best For |
|---|---|---|
| Railway | Low | Quick setup, managed infrastructure |
| Docker | Medium | Custom infrastructure, Kubernetes |
| Manual | High | Full 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
- Railway Deployment - Deploy with Railway
- Docker Deployment - Container deployment
- Production Checklist - Pre-launch checklist
- Security - Security features and compliance
- Environment Variables - Configuration reference