Rocket.Chat is an open-source communication platform: team chat with channels, threads, video calls and integrations, plus omnichannel customer service. A live chat widget for your website, and connectors for WhatsApp, email and social channels, put customer conversations in the same place as team chat. It runs on Node.js with MongoDB, and deploys easily with Docker.

Comparing options? See Mattermost and Matrix Synapse.

Sizing

Concurrent users VPS
Up to ~200 2 vCPU, 4 GB RAM
200–1,000 4 vCPU, 8 GB RAM
Larger Multiple instances, separate MongoDB

Check the current Starter/Community plan limits on Rocket.Chat’s site. Workspace registration and free-tier limits have changed over time.

Docker Compose

Rocket.Chat publishes an official compose file. Its key parts:

# /opt/rocketchat/compose.yaml (outline – use the official file)
services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:7.4.0     # pin the version
    restart: unless-stopped
    environment:
      MONGO_URL: mongodb://mongodb:27017/rocketchat?replicaSet=rs0
      MONGO_OPLOG_URL: mongodb://mongodb:27017/local?replicaSet=rs0
      ROOT_URL: https://chat.example.com
      PORT: 3000
      DEPLOY_METHOD: docker
    ports:
      - "127.0.0.1:3000:3000"
    depends_on: [mongodb]

  mongodb:
    image: docker.io/bitnami/mongodb:6.0
    restart: unless-stopped
    environment:
      MONGODB_REPLICA_SET_MODE: primary
      MONGODB_REPLICA_SET_NAME: rs0
      MONGODB_PORT_NUMBER: 27017
      MONGODB_INITIAL_PRIMARY_HOST: mongodb
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: 27017
      MONGODB_ADVERTISED_HOSTNAME: mongodb
      MONGODB_ENABLE_JOURNAL: "true"
      ALLOW_EMPTY_PASSWORD: "yes"
    volumes:
      - mongodb_data:/bitnami/mongodb

volumes:
  mongodb_data:

Rocket.Chat requires MongoDB running as a replica set (even a single node), for its oplog. The MongoDB container must stay on the internal Docker network, and never be published to the internet. See MongoDB replica set.

cd /opt/rocketchat && docker compose up -d
docker compose logs -f rocketchat       # wait for "SERVER RUNNING"

HTTPS with Nginx

server {
    server_name chat.example.com;
    client_max_body_size 200M;
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Nginx-Proxy true;
    }
    # listen 443 ssl; certbot --nginx -d chat.example.com
}

ROOT_URL must match the public URL exactly. See Nginx WebSocket proxy.

Setup wizard

Open https://chat.example.com:

  1. Create the admin user.
  2. Enter organisation details.
  3. Register the workspace (needed for mobile push notifications through Rocket.Chat’s gateway, marketplace apps and some features).

Then in Administration:

  • Email / SMTP for invitations and notifications. See transactional email services;
  • Accounts: disable open registration, or require admin approval, and enable 2FA;
  • File upload: storage on the filesystem, GridFS or S3-compatible storage. See MinIO.

Omnichannel: live chat for your website

Enable Omnichannel, create departments and agents, then copy the Livechat widget snippet into your website. Visitors chat from the site, and agents answer inside Rocket.Chat. Add canned responses, business hours, and routing to available agents. Apps add WhatsApp, email and social channels.

Integrations and apps

Incoming and outgoing webhooks, a REST API, bots, and the marketplace (Jira, GitHub, GitLab, video conferencing with Jitsi). Post monitoring alerts into channels. See uptime monitoring tools.

Backups and upgrades

  • Backup MongoDB regularly:
docker compose exec -T mongodb mongodump --archive --gzip > /backups/rocketchat-$(date +%F).archive.gz

Also back up uploaded files if they’re stored on the filesystem. Copy everything off-server. See MongoDB backup and restore.

  • Upgrades: check release notes for the supported MongoDB versions and upgrade paths. Upgrade one major version at a time, after a backup. See updating self-hosted apps.

Security

  • HTTPS only, 2FA, no open registration.
  • MongoDB never exposed. Admin access only for admins.
  • Keep Rocket.Chat updated. Chat servers are internet-facing and widely targeted.

Quick reference

Item Value
App port 3000 (behind Nginx)
Public URL ROOT_URL
Database MongoDB replica set (rs0)
Backup mongodump --archive --gzip
Website widget Omnichannel → Livechat installation

Related: Docker Compose and Docker security.

  • Self-Hosting
  • Chat
  • Docker