How to Install Rocket.Chat for Team Communication

Rocket.Chat is a self-hosted team messaging platform — a Slack alternative you fully control, with support for channels, direct messages, and video calls.

Prerequisites

  • Docker Engine and Docker Compose installed
  • A domain name (recommended)
  • 2 vCPU, 2 GB RAM minimum

Step 1 — Create a Project Directory

mkdir ~/rocketchat && cd ~/rocketchat

Step 2 — Create docker-compose.yml

services:
  mongodb:
    image: mongo:6
    restart: unless-stopped
    command: mongod --replSet rs0 --oplogSize 128
    volumes:
      - mongo_data:/data/db

  mongo-init-replica:
    image: mongo:6
    command: >
      mongosh mongodb://mongodb:27017 --eval
      "rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'mongodb:27017'}]})"
    depends_on:
      - mongodb

  rocketchat:
    image: rocket.chat:latest
    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.yourdomain.com
      - PORT=3000
    ports:
      - "3000:3000"
    depends_on:
      - mongodb

volumes:
  mongo_data:

Rocket.Chat requires MongoDB running as a replica set (even single-node) for its real-time features to function correctly.

Step 3 — Start the Stack

docker compose up -d

Wait a minute for the replica set initialization to complete before proceeding.

Step 4 — Access Rocket.Chat

http://YOUR_SERVER_IP:3000

Step 5 — Complete the Setup Wizard

Create your administrator account and configure basic organization details.

Step 6 — Add HTTPS

See How to Install Nginx Proxy Manager with Docker — ensure WebSocket support is enabled in the proxy configuration, since Rocket.Chat relies heavily on WebSockets for real-time messaging.

Creating Channels

From the admin/main interface, create channels for your team, configure permissions, and invite users.

Setting Up Push Notifications

Configure push notification gateway settings in the admin panel for mobile app notifications — consult Rocket.Chat's official documentation for current configuration requirements.

Backing Up Rocket.Chat

docker exec rocketchat-mongodb-1 mongodump --archive=/data/db/backup.archive
docker cp rocketchat-mongodb-1:/data/db/backup.archive ./rocketchat-backup.archive

Common Errors

"MongoNetworkError" on startup — the replica set initialization may not have completed; wait longer, or manually verify with mongosh inside the MongoDB container.

Real-time messages don't update without refresh — confirm your reverse proxy correctly passes WebSocket connections (the Upgrade/Connection headers).

Best Practices

  • Ensure the reverse proxy explicitly supports WebSockets
  • Back up MongoDB regularly given it holds all messages and user data
  • Monitor resource usage as your team/message volume grows

Continue Reading

Browse more articles in Popular Self-Hosted Applications.

  • rocket.chat, self hosted slack alternative, team chat, mongodb docker
  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

How to Install Nextcloud on a VPS with Docker

Nextcloud is a self-hosted file sync, sharing, and collaboration platform — a...

How to Install GitLab CE on a VPS

GitLab Community Edition is a full-featured, self-hosted DevOps platform — Git repository...

How to Install Ghost CMS on a VPS

Ghost is a modern, fast, purpose-built platform for blogging and newsletters — a lighter,...

How to Set Up a Minecraft Server on a VPS

Running your own Minecraft server gives you full control over mods, plugins, and world settings....

How to Install n8n for Workflow Automation

n8n is a self-hosted workflow automation tool — connecting apps and APIs through a visual...