Running Coral with Docker on Synology NAS

Learn why MongoDB 4.4.24 was chosen for installing Coral Talk on a Synology NAS, what to consider if you want to use MongoDB 8 on other servers, and how to integrate Coral Talk with a Ghost blog.

Running Coral with Docker on Synology NAS

Introduction

Recently, I set up Coral Talk (by The Coral Project) on my Synology NAS using Docker Compose. During the installation process, I faced a decision about which version of MongoDB to use. Although MongoDB 8 has been released with many improvements, I chose MongoDB 4.4.24 for compatibility reasons.

In this blog, I’ll explain why that choice was necessary, what alternatives are available if you’re installing Coral on different hardware, and how to apply Coral Talk to a Ghost blog after installation.


Why I Used MongoDB 4.4.24 on Synology NAS

The main reason I had to use MongoDB 4.4.24 is hardware and software compatibility. Synology NAS systems, depending on their architecture, often come with older kernel versions and sometimes limited Docker image support.

Here’s why 4.4.24 was the right fit:

  1. CPU Architecture Support
    • Many Synology NAS devices run on ARM or lower-end Intel CPUs. MongoDB 5+ dropped support for some of these older architectures.
    • MongoDB 4.4.24 is one of the last stable versions that still supports older CPUs found in many NAS devices.
  2. Stability on Docker
    • Synology’s Docker implementation is not always up to date with the latest kernel features.
    • MongoDB 4.4.24 is a long-term support (LTS) release, making it reliable for such environments.
  3. Coral Talk Compatibility
    • Coral Talk doesn’t explicitly require the newest MongoDB version.
    • Using 4.4.24 ensures maximum compatibility with Coral’s codebase without introducing unnecessary risks.

If You’re Installing Coral Talk Elsewhere: Why You Might Use MongoDB 8

If you’re not using a Synology NAS and instead running Coral Talk on:

  • A dedicated server
  • A VPS (like DigitalOcean, AWS, or Hetzner)
  • A modern desktop/server with updated CPU architecture

…then you can safely consider MongoDB 8.

Here’s why:

  • Performance Improvements: MongoDB 8 includes query performance boosts, better indexing options, and improved replica set management.
  • Security Enhancements: Newer versions benefit from more up-to-date patches and encryption options.
  • Future-Proofing: Since MongoDB 4.4 is already in extended support, moving to MongoDB 8 ensures long-term stability.

In short, if your server can handle it, go with MongoDB 8. But if you’re on Synology NAS, 4.4.24 may be your best bet.


My Docker Compose Setup

Here’s the docker-compose.yml I used for my Synology installation:

services:
  coral:
    image: coralproject/talk:latest
    container_name: coral-wody-kr-app
    restart: unless-stopped
    environment:
      PORT: "19190"
      NODE_ENV: "production"
      MONGODB_URI: "mongodb://mongo:27017/coral"
      REDIS_URI: "redis://redis:6379/0"
      SIGNING_SECRET: "4s5ms45ms45ssn45erta2b3223nma62b78b"
      FORCE_SSL: "true"
      TRUST_PROXY: "1"
      ROOT_URL: "https://coral.wody.kr"
    ports:
      - "19190:19190"
    depends_on:
      mongo:
        condition: service_healthy
      redis:
        condition: service_healthy

  mongo:
    image: mongo:4.4.24
    container_name: coral-wody-kr-mongo
    command: ["--bind_ip_all"]
    restart: unless-stopped
    volumes:
      - ./mongo:/data/db
    healthcheck:
      test: ["CMD-SHELL", "pgrep mongod > /dev/null || exit 1"]
      interval: 30s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    container_name: coral-wody-kr-redis
    restart: unless-stopped
    volumes:
      - ./redis:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 5s
      retries: 5
      start_period: 10s

This setup ensures:

  • Coral Talk runs on port 19190.
  • MongoDB 4.4.24 handles database operations.
  • Redis manages caching and session storage.

Post-Installation Steps

After running docker-compose up -d, I followed these steps:

Check Containers

docker ps

Make sure all three services (coral, mongo, redis) are running.

Access Coral Talk
Open your browser and go to:

https://your-domain.com

Set Up Admin User
The first time you visit, you’ll be prompted to create an admin account.

Secure with Reverse Proxy
On Synology, I configured DSM Reverse Proxy to map

https://coral.wody.kr → http://localhost:19190

Integrating Coral Talk with Ghost Blog

Now that Coral Talk is running, the next step was to connect it to my Ghost blog. Here’s how I did it:

  1. Install Ghost
    If you don’t already have Ghost running, install it via Docker or on a server.
  2. Enable Commenting
    Coral Talk doesn’t natively integrate with Ghost. Instead, you embed it manually:
    • Go to the Ghost Admin Panel
    • Navigate to the Code Injection section (in Settings)
    • Add the following script to the Footer:
<div id="coral_thread"></div>
<script src="https://coral.wody.kr/embed.js" async onload="
  Coral.createStreamEmbed({
    id: 'coral_thread',
    autoRender: true,
    rootURL: 'https://coral.wody.kr',
    storyID: '{{post.id}}',
    storyURL: '{{url absolute="true"}}'
  });
"></script>

Then, Test Your Comments

    • Open any blog post.
    • You should now see Coral Talk comments integrated directly into your Ghost blog!

FAQs

1. Why can’t I use MongoDB 8 on Synology NAS?
Because Synology often uses older hardware and kernels that MongoDB 8 no longer supports.

2. Is MongoDB 4.4.24 secure enough?
Yes, as long as you keep your Docker images up to date and run it behind SSL.

3. Can I migrate from 4.4.24 to MongoDB 8 later?
Yes, but you should back up your database first (mongodump / mongorestore).

4. Does Coral Talk work with other CMS platforms?
Yes! It can be embedded into WordPress, Ghost, or any site via JavaScript.

5. Can I use PostgreSQL instead of MongoDB?
No, Coral Talk only supports MongoDB.

6. How many users can Coral Talk handle on Synology?
That depends on your NAS model. For small blogs, it works fine. For high traffic, use a VPS or dedicated server.


Conclusion

Setting up Coral Talk on my Synology NAS required using MongoDB 4.4.24 for compatibility reasons. However, if you’re installing on a modern server or VPS, you can benefit from MongoDB 8’s improved performance and security.

Once installed, integrating Coral Talk with Ghost is straightforward via an embed script. Now, my blog posts have a professional, moderated comment system that’s much better than basic alternatives.

👉 Whether you’re on Synology or a dedicated server, Coral Talk is a great way to bring community-driven discussions to your site.