---
title: "Deploy Coral Talk | (Just Updated) Disqus Alternative, Comment System With Admin Login Generated, Sign-Up Closed"
description: "Coral Talk self-hosted comment system, Disqus alternative, MongoDB, Redis"
category: "Other"
url: https://railway.com/deploy/coral-talk-or-just-updated-disqus-altern
---

# Deploy Coral Talk | (Just Updated) Disqus Alternative, Comment System With Admin Login Generated, Sign-Up Closed

Coral Talk self-hosted comment system, Disqus alternative, MongoDB, Redis

**[Deploy Coral Talk | (Just Updated) Disqus Alternative, Comment System With Admin Login Generated, Sign-Up Closed on Railway](https://railway.com/template/coral-talk-or-just-updated-disqus-altern)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/coral-talk-or-just-updated-disqus-altern/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Other

## Template content

### redis

- **Image:** redis:8.2.1-alpine@sha256:987c376c727652f99625c7d205a1cba3cb2c53b92b0b62aade2bd48ee1593232
- **Start command:** `/bin/sh -c 'chown -R redis:redis /data && exec docker-entrypoint.sh redis-server --requirepass "$REDIS_PASSWORD" --appendonly yes --dir /data --maxmemory 256mb --maxmemory-policy volatile-lru'`

### coral

- **Image:** ghcr.io/bon5co/coral-railway:9.11.9@sha256:8311d925d69951873907f8aa37162b99e8aca38c2ff1c3f8056452aee3180a70
- **Health check:** /api/health
- **Public domain:** Yes

### mongo

- **Image:** mongo:8.0@sha256:bdc216e9d5a6ec2cfdac789b5832fdab64cd32055f59885cae918a92de63c361
- **Start command:** `/bin/sh -c 'set -e; M=$(cat /sys/fs/cgroup/memory.max 2>/dev/null || echo max); if [ "$M" != max ]; then G=$(awk -v m=$M "BEGIN{g=m/4/1073741824; if (g<0.25) g=0.25; printf \"%.2f\", g}"); else G=0.5; fi; export MONGO_INITDB_ROOT_USERNAME=root; echo "[railway] uid=$(id -u) wiredTigerCacheGB=$G owner=$(stat -c %u:%g /data/db)"; exec docker-entrypoint.sh mongod --ipv6 --bind_ip_all --wiredTigerCacheSizeGB $G'`

## Documentation

# Deploy and Host Coral Talk on Railway

**Built for an LLM agent to deploy and use.** The deploy form has no fields to fill: the admin login, the signing secret and the database and Redis passwords are generated, the server cannot start without them, and the admin account exists before the first request. Coral Talk is a self-hosted comment system for news sites and blogs, an open-source alternative to Disqus with threaded comments, a moderation queue, user and story management, an embeddable comment stream and a GraphQL API.

## About Hosting Coral Talk

This template runs three services: **coral**, the upstream Coral Talk image (v9.11.9) pinned by digest through a thin wrapper, **mongo**, a MongoDB 8.0 database with a volume at `/data/db` that holds comments, users and the tenant, and **redis**, a Redis 8 instance with a volume at `/data` that holds the cache, rate limits and job queues. Coral keeps nothing on its own disk, so the `coral` service has no volume. One public domain serves the comment stream, the admin at `/admin` and the GraphQL API. The server listens on Railway's injected `PORT`, and the healthcheck is `GET /api/health`.

**What the wrapper fixes.** Upstream has no first account until someone opens the `/install` page in a browser, and that page is public until it is used: whoever reaches a fresh deploy first becomes the owner. Every setting (MongoDB and Redis addresses, signing secret) is also a variable to type. The wrapper bakes the fixed settings into the image so the deploy form is empty, starts the server on a loopback port, installs the tenant and the admin account from `ADMIN_EMAIL` and `ADMIN_PASSWORD`, closes public registration through the settings API, and only then starts the real server on `PORT`, so the install page is never reachable from outside. It refuses to start without a strong admin password and signing secret, and a restart leaves the existing account and settings unchanged. It also patches the sign-up handler to answer 403 where upstream answers HTTP 500 for a closed registration. Read from the upstream source and checked on a Railway deploy: sign-up answers 403, a second install answers `TENANT_INSTALLED_ALREADY`, the generated login signs in. Not reproduced on a Railway control of an incumbent listing.

**Using it.** Open the domain's `/admin` and sign in with `ADMIN_EMAIL` and `ADMIN_PASSWORD`, then add your site's origin under Configure > General and embed the comment stream script on your pages. Everything is stored in MongoDB, so redeploys keep it.

### Agent contract

- Public URL: `https://RAILWAY_PUBLIC_DOMAIN` (the generated domain of the `coral` service)
- Private URL: `http://coral.railway.internal:8080`
- Credentials: the variables `ADMIN_EMAIL` and `ADMIN_PASSWORD` on the `coral` service (plain text; `ADMIN_EMAIL` is `admin@` plus the public domain)
- Auth: `POST /api/auth/local` with `{"email","password"}` returns `{"token":"JWT"}`; send it as `Authorization: Bearer JWT` to the GraphQL API at `POST /api/graphql` with `Content-Type: application/json`. A wrong password answers `401`; a GraphQL call without a token answers HTTP 400 `RAW_QUERY_NOT_AUTHORIZED`.
- Health: `GET /api/health` returns 200 `OK` without credentials

```bash
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, ADMIN_EMAIL, ADMIN_PASSWORD (variables of the coral service); also curl, grep, sed.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J="content-type: application/json"
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/api/health")" = 200 ]; do n=$((n+1)); [ "$n" -le 60 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/api/health"
# Coral logs in over REST (POST /api/auth/local returns a JWT) and serves GraphQL at POST /api/graphql with Authorization: Bearer.
# a wrong password does not sign in
curl -s -o /dev/null -w "wrong password: %{http_code}\n" -H "$J" -d '{"email":"'"$ADMIN_EMAIL"'","password":"not-the-admin-secret"}' "$R/api/auth/local"
# the generated login returns a token
T=$(curl -s -H "$J" -d '{"email":"'"$ADMIN_EMAIL"'","password":"'"$ADMIN_PASSWORD"'"}' "$R/api/auth/local" | sed -n 's/.*"token":"\([^"]*\)".*/\1/p')
echo "login: $(echo "$T" | cut -c1-3)"
gql() { curl -s -H "$J" -H "Authorization: Bearer $T" -d "$1" "$R/api/graphql"; }
echo "signed in as: $(gql '{"query":"query{viewer{email role}}"}' | grep -o '"role":"[A-Z]*"')"
# write-auth: a write (rename the organization) with the token succeeds, the same write without it is refused
echo "write with token: $(gql '{"query":"mutation{updateSettings(input:{settings:{organization:{name:\"Agent Org\"}},clientMutationId:\"a\"}){settings{organization{name}}}}"}' | grep -o '"name":"Agent Org"')"
echo "write without key: $(curl -s -H "$J" -d '{"query":"mutation{updateSettings(input:{settings:{organization:{name:\"Anon\"}},clientMutationId:\"a\"}){clientMutationId}}"}' "$R/api/graphql" | grep -oiE 'NOT_AUTHORIZED|UNAUTHORIZED')"
# public signup: a stranger's registration is refused with 403
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "$J" -d '{"username":"stranger","email":"stranger@example.org","password":"Stranger-Pass-Abcdef"}' "$R/api/auth/local/signup"
```

Expected output against a fresh deploy (measured on the Railway demo; the control-deploy output of the published code is recorded in `template.md`):

```text
health: 200
wrong password: 401
login: eyJ
signed in as: "role":"ADMIN"
write with token: "name":"Agent Org"
write without key: NOT_AUTHORIZED
public signup: 403
```

The refusals are the contract: a wrong password answers `401` (`wrong password: 401`), a GraphQL write without the token answers `NOT_AUTHORIZED` (`write without key: NOT_AUTHORIZED`, HTTP 400 with the refusal in the body), and a stranger's sign-up answers `403` (`public signup: 403`).

## Why Deploy Coral Talk on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Coral Talk on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

- **Agent-ready** - no deployer fields, a contract block, and one script that proves the server is healthy, a wrong password and a stranger do not get in, and the generated login does.
- **Locked from the first request** - the install page is used before the server is public, registration is closed, and the server will not start without strong secrets.
- **Data survives redeploys** - comments and users live in MongoDB on a volume, the cache and queues in Redis on a volume.
- **Works on first deploy** - the listener follows Railway's injected `PORT` and the databases are reached over the private network.
- **Pinned** - the upstream image is pinned by digest and the wrapper by tag and digest.

## Common Use Cases

- **Comments on a blog or news site** - embed a moderated comment stream and keep the data on your own domain.
- **A Disqus replacement** - threaded replies, reactions, user bans and a moderation queue without ads or tracking.
- **Community moderation for several sites** - one install serves multiple sites and stories, managed from one admin.

## Dependencies for Coral Talk Hosting

- The coral service, a MongoDB service and a Redis service, the two databases each with their volume, created by the template.

### Deployment Dependencies

- [Coral Talk repository](https://github.com/coralproject/talk)
- [Coral Talk documentation](https://docs.coralproject.net)
- [Wrapper image source](https://github.com/bon5co/coral-railway)


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/coral-talk-or-just-updated-disqus-altern
