---
title: "Deploy Coral"
description: "Discussions, Journalist Identification, Moderation Tools with AI Support"
category: "CMS"
url: https://railway.com/deploy/coral
---

# Deploy Coral

Discussions, Journalist Identification, Moderation Tools with AI Support

**[Deploy Coral on Railway](https://railway.com/template/coral)**

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

- **Creator:** OpenSource Templates
- **Category:** CMS

## Template content

### mongo https://devicons.railway.app/i/mongodb.svg

- **Image:** mongo:4

### coral https://cdn.jsdelivr.net/gh/selfhst/icons/svg/voxmedia-coral.svg

- **Image:** coralproject/talk:9.7.0
- **Public domain:** Yes

### redis https://devicons.railway.app/i/redis.svg

- **Image:** redis:6

## Documentation

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/new/template/coral)

### Deploy and Host Coral Project (Talk) on Railway

**Coral** (formerly Coral Project Talk) is an open-source, highly scalable commenting platform built for newsrooms, blogs, and online communities. This Railway template provisions a full three-tier stack comprising the **Coral Talk** web and API server (`coral`), a **MongoDB** database (`mongo`), and a **Redis** in-memory cache and pub/sub engine (`redis`).

---

#### About Hosting Coral

Hosting Coral Project on Railway deploys a robust multi-container architecture:

* **Coral Talk Server (`coral`)**: Core web and API application running `coralproject/talk:9.7.0`. It listens internally on port `3000`, serving comment streams, moderation tools, and community administration interfaces. It connects seamlessly to MongoDB and Redis via Railway private networking (`${{mongo.MONGO_URL}}` and `${{redis.REDIS_URL}}`).
* **MongoDB Database (`mongo`)**: Document store running `mongo:4` that holds user accounts, comment threads, moderation flags, and site configurations. It mounts a persistent storage volume at `/data/db` and provides TCP proxying for external database management.
* **Redis Cache & Pub/Sub (`redis`)**: In-memory data store running `redis:6` used for real-time comment streaming, session caching, and background task queues. It mounts a persistent storage volume at `/data` to maintain state across deployments.

---

#### Common Use Cases

* **Engaging newsroom comment streams**: Embed fast, real-time comment sections onto articles, blog posts, and media publications.
* **AI-assisted & human moderation**: Streamline comment review with automated toxicity filters, word blocklists, user reporting, and moderator workflows.
* **Community building & user management**: Reward constructive commenters, badge staff members, manage user bans, and track user engagement metrics.
* **Data privacy & ownership**: Retain full control over reader discussions and user data on self-hosted infrastructure rather than third-party widgets.

---

#### Dependencies for Coral Hosting

* **Coral Talk image:** `coralproject/talk:9.7.0`
* **MongoDB image:** `mongo:4`
* **Redis image:** `redis:6`
* **Two persistent volumes**:
  * `/data/db` mounted on the `mongo` service
  * `/data` mounted on the `redis` service
* **Railway public domain** attached to port `3000` for `coral`
* **Auto-generated secrets**: `SIGNING_SECRET` (45 chars), `MONGO_INITDB_ROOT_PASSWORD` (16 chars), and `REDIS_PASSWORD` (32 chars)

**Upstream:** [Coral Project Site](https://coralproject.net) · [GitHub (coralproject/talk)](https://github.com/coralproject/talk)

##### Implementation Details

| Service | Image | Role | Internal Port | Volume Mount |
| ------ | ------ | ------ | ------ | ------ |
| **coral** | `coralproject/talk:9.7.0` | Core Web Server & API | `3000` | None |
| **mongo** | `mongo:4` | Primary Document Database | `27017` | `/data/db` |
| **redis** | `redis:6` | Cache & Real-Time Pub/Sub | `6379` | `/data` |

---

#### Topology

| Service | Role | Volume | Public | Notes |
| ------ | ------ | ------ | ------ | ------ |
| **coral** | Commenting Server & Admin UI | None | Yes (Port `3000`) | Main entry point for readers & admins |
| **mongo** | MongoDB Data Store | `/data/db` | TCP Proxy (`27017`) | Holds comments, users & site configs |
| **redis** | Session & Real-Time Cache | `/data` | TCP Proxy (`6379`) | Manages pub/sub events & task queues |

###### Volumes (drives) — what to mount

| Service | Mount path | What is stored |
| ------ | ------ | ------ |
| **mongo** | `/data/db` | MongoDB BSON files, collections, indices, user accounts, and comment records |
| **redis** | `/data` | Redis append-only file (AOF) / RDB persistence snapshots for queues and session cache |

> **Warning:** Do **not** remove or detach the persistent volumes mounted on `mongo` (`/data/db`) or `redis` (`/data`) — deleting these volumes will result in permanent loss of comments, user accounts, and moderation history across deployments.

---

#### Quick Start

1. Click the **[Deploy on Railway](https://railway.com/deploy)** button above.
2. Sign in (or create a free Railway account) and click **Deploy**.
3. Wait 2–3 minutes for `mongo`, `redis`, and `coral` services and persistent volumes to provision.
4. Open the **coral** service → **Settings** → **Networking** and click the generated public domain URL.
5. Access the Coral initial wizard at `https://your-domain.up.railway.app/admin/install` (or follow on-screen setup prompts) to configure your organization, initial admin user, and allowed domain origins.

---

#### Configuration

##### Coral Application Variables (`coral`)

| Variable | Default / Source | Description / Notes |
| ------ | ------ | ------ |
| `MONGODB_URI` | `${{mongo.MONGO_URL}}` | MongoDB connection string provided via private network |
| `REDIS_URI` | `${{redis.REDIS_URL}}` | Redis connection string provided via private network |
| `SIGNING_SECRET` | Auto-generated secret (45 chars) | Secret key for signing JWT tokens and authentication sessions |
| `NODE_ENV` | `production` | Node execution environment |
| `PORT` | `3000` | HTTP port the Coral server listens on |

##### MongoDB Database Variables (`mongo`)

| Variable | Default / Source | Description / Notes |
| ------ | ------ | ------ |
| `MONGODB_DATABASE` | `railway` | Default database name |
| `MONGO_INITDB_ROOT_USERNAME` | `${MONGO_USER}` | MongoDB root administrative user |
| `MONGO_INITDB_ROOT_PASSWORD` | Auto-generated secret (16 chars) | MongoDB root administrative password |
| `MONGO_URL` | `mongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:27017` | Internal private MongoDB connection URL |
| `MONGO_PUBLIC_URL` | TCP Proxy connection URL | External URL for database management tools |

##### Redis Cache Variables (`redis`)

| Variable | Default / Source | Description / Notes |
| ------ | ------ | ------ |
| `REDISUSER` | `default` | Default Redis user |
| `REDIS_PASSWORD` | Auto-generated secret (32 chars) | Redis authentication password |
| `REDIS_URL` | `redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379` | Internal private Redis connection string |
| `REDIS_PUBLIC_URL` | TCP Proxy connection URL | External connection URL for Redis tools |

##### Custom Domain & CORS Origin Setup

1. Open the **coral** service → **Settings** → **Networking** → **Custom Domain**.
2. Add your custom domain and complete DNS setup.
3. In the Coral Admin UI under **Configure** → **Permitted Domains**, add your embedding website's domain name so Coral comment streams can render cross-origin.

---

#### Updating Coral

1. Open the **coral** service → **Settings** → **Source**.
2. Update the image tag (e.g., `coralproject/talk:9.7.0` to a newer release tag).
3. Click **Redeploy**.

Database records in `/data/db` and cache state in `/data` will remain safe across updates.

---

#### Traps

**Common pitfalls and failure modes:**

* **Unpermitted Domain Embedding (CORS Errors)** — Coral enforces domain checks for embedded comment streams. If your embedding site URL is not added to Coral's allowed domains in the admin console, comment streams will fail to load.
* **Volume Detachment Data Loss** — Detaching or deleting the `/data/db` volume on the `mongo` service will erase all comments, user profiles, and moderation logs.
* **Database / Cache Startup Race Condition** — On cold deploys, `coral` requires `mongo` and `redis` to accept connections. If `coral` starts before MongoDB or Redis is fully initialized, wait for healthchecks to settle and trigger a quick redeploy on `coral`.
* **Missing SIGNING_SECRET Rotation Notice** — Changing `SIGNING_SECRET` invalidates active user sessions and admin login cookies across your community.

---

#### Why Deploy Coral on Railway?

Railway provides seamless multi-tier container orchestration, automated private service networking, persistent storage mounts, and SSL certificates out of the box. Hosting Coral on Railway gives newsrooms and community managers a scalable, zero-maintenance commenting platform that stays online 24/7.

---


## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/coral
