Deploy Coral

Discussions, Journalist Identification, Moderation Tools with AI Support

Deploy Coral

mongo

mongo:4

Just deployed

/data/db

Just deployed

redis

redis:6

Just deployed

/data

Deploy on Railway

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 · GitHub (coralproject/talk)

Implementation Details
ServiceImageRoleInternal PortVolume Mount
coralcoralproject/talk:9.7.0Core Web Server & API3000None
mongomongo:4Primary Document Database27017/data/db
redisredis:6Cache & Real-Time Pub/Sub6379/data

Topology
ServiceRoleVolumePublicNotes
coralCommenting Server & Admin UINoneYes (Port 3000)Main entry point for readers & admins
mongoMongoDB Data Store/data/dbTCP Proxy (27017)Holds comments, users & site configs
redisSession & Real-Time Cache/dataTCP Proxy (6379)Manages pub/sub events & task queues
Volumes (drives) — what to mount
ServiceMount pathWhat is stored
mongo/data/dbMongoDB BSON files, collections, indices, user accounts, and comment records
redis/dataRedis 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 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)
VariableDefault / SourceDescription / 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_SECRETAuto-generated secret (45 chars)Secret key for signing JWT tokens and authentication sessions
NODE_ENVproductionNode execution environment
PORT3000HTTP port the Coral server listens on
MongoDB Database Variables (mongo)
VariableDefault / SourceDescription / Notes
MONGODB_DATABASErailwayDefault database name
MONGO_INITDB_ROOT_USERNAME${MONGO_USER}MongoDB root administrative user
MONGO_INITDB_ROOT_PASSWORDAuto-generated secret (16 chars)MongoDB root administrative password
MONGO_URLmongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:27017Internal private MongoDB connection URL
MONGO_PUBLIC_URLTCP Proxy connection URLExternal URL for database management tools
Redis Cache Variables (redis)
VariableDefault / SourceDescription / Notes
REDISUSERdefaultDefault Redis user
REDIS_PASSWORDAuto-generated secret (32 chars)Redis authentication password
REDIS_URLredis://default:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379Internal private Redis connection string
REDIS_PUBLIC_URLTCP Proxy connection URLExternal 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.



Template Content

More templates in this category

View Template
Libredesk - Complete Setup
Complete self-hosted omnichannel customer support desk.

codestorm
2
View Template
Paperless-ngx
Paperless-ngx — document management with OCR and full-text search

INAPP
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
167