← Back to relax/relax

How to Deploy & Use relax/relax

Relax CMS Deployment and Usage Guide

Prerequisites

Before installing Relax CMS, ensure you have the following installed:

  • Node.js - Required runtime environment
  • Yarn - Package manager (preferred over npm)
  • MongoDB - Database system for data persistence
  • libvips - Image processing library (if using OS X, may need to uninstall via brew remove libvips due to sharp compilation issues)

Installation

  1. Clone the repository:

    git clone https://github.com/relax/relax.git
    cd relax
    
  2. Install dependencies:

    yarn
    
  3. Build the application:

    yarn build
    
  4. Start the application:

    yarn start
    

The application will run on port 8080 by default. Visit http://localhost:8080/admin/init to set up your first user.

Configuration

Relax CMS can be configured using a .relaxrc file. You can place this file:

  • Next to the application
  • In any parent folder
  • In your HOME folder

A sample configuration file with default values is available at .relaxrc.sample. The configuration file allows you to customize various application settings.

Build & Run

Development

For development with automatic rebuilding:

yarn dev

This command keeps the application running while watching for changes, automatically restarting when needed and keeping bundles up to date.

Production

For production deployment:

yarn build
yarn start

Docker Deployment

To deploy using Docker:

  1. Start MongoDB in a container:

    docker run -d --name mongo mongo
    
  2. Start Relax CMS:

    docker run -p 8080:8080 --link mongo -it relax/relax
    

The application will be accessible at http://localhost:8080.

Deployment

Relax CMS can be deployed on various platforms:

Platform as a Service (PaaS)

  • Heroku: Deploy the Docker container directly or use a Node.js buildpack
  • Render: Deploy as a Node.js web service with MongoDB add-on
  • Railway: Deploy with MongoDB and other services

Container Platforms

  • Docker Compose: Use with MongoDB container for local development
  • Kubernetes: Deploy with MongoDB StatefulSet or external MongoDB service
  • AWS ECS/Fargate: Container deployment with RDS for MongoDB

Traditional Hosting

  • DigitalOcean: Deploy on Ubuntu/Node.js droplet with MongoDB installation
  • VPS: Self-hosted deployment with PM2 process manager

Troubleshooting

Common Issues

  1. Image processing compilation errors on OS X:

    • Uninstall libvips if installed globally: brew remove libvips
    • See sharp issue #602 for more information
  2. MongoDB connection issues:

    • Ensure MongoDB is running and accessible
    • Check connection strings in configuration
    • Verify firewall settings allow database connections
  3. Port conflicts:

    • Change the default port (8080) in configuration if needed
    • Ensure no other services are using the same port

Getting Help

Important Notes

  • Relax CMS is currently in beta and not yet ready for production use
  • The project is no longer maintained; consider the newer Clutch project for active development
  • Always back up your data before making significant changes or updates