10 Sentinels Active
SENTINEL 01: [AEGIS] AUDITING POCKETBASE INFRASTRUCTURE...
Back to Self-Hosted Stacks
Rocket.Chat

Deploy Rocket.Chat

The Secure CommsOS™ for mission-critical operations

Quick Start

1

Create a directory

mkdir rocketchat-self-hosted && cd rocketchat-self-hosted
2

Create config file

Copy the content from the Config tab below into a file named docker-compose.yml

3

Deploy

docker compose up -d
Fast Track

Deploy Rocket.Chat in Minutes

Use our optimized Docker templates to deploy Rocket.Chat on any cloud provider. Get $200 in free credit to start on DigitalOcean.

Start with free creditDeploy on DigitalOcean
$200

Metadata

License
Other
Language
TypeScript
Last Updated
10/14/2026
Category
Communication

Configuration

yaml

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 🚀 BUILT & MAINTAINED BY THE ALTSTACK
# 🌍 https://thealtstack.com
# 💡 Open-source deployment templates for modern self-hosting.
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

# Docker Compose for Rocket.Chat
version: '3.8'

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:latest
    container_name: rocketchat
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$? && break || s=$?;
          echo "Tried $i times. Waiting 5 secs...";
          sleep 5;
        done; (exit $s)"
    restart: unless-stopped
    volumes:
      - rocketchat_uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=${ROOT_URL:-http://localhost:3000}
      - MONGO_URL=mongodb://mongodb:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongodb:27017/local
    depends_on:
      - mongodb
    ports:
      - "3000:3000"
    networks:
      - rocketchat_net
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/api/info"]
      interval: 30s
      timeout: 10s
      retries: 3

  mongodb:
    image: mongo:5.0
    container_name: rocketchat_mongo
    restart: unless-stopped
    volumes:
      - rocketchat_mongo_db:/data/db
      - rocketchat_mongo_dump:/dump
    command: mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger
    networks:
      - rocketchat_net
    healthcheck:
      test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
      interval: 10s
      timeout: 10s
      retries: 5

  # MongoDB Replica Set initialization
  mongo-init-replica:
    image: mongo:5.0
    command: >
      bash -c
        "for i in `seq 1 30`; do
          mongo mongodb/rocketchat --eval "
            rs.initiate({
              _id: 'rs0',
              members: [ { _id: 0, host: 'localhost:27017' } ]})" &&
          s=$? && break || s=$?;
          echo "Tried $i times. Waiting 5 secs...";
          sleep 5;
        done; (exit $s)"
    depends_on:
      - mongodb
    networks:
      - rocketchat_net

networks:
  rocketchat_net:
    driver: bridge

volumes:
  rocketchat_uploads:
  rocketchat_mongo_db:
  rocketchat_mongo_dump:

Community Notes

Help others by adding context, corrections, or warnings about this tool. Sign in to contribute.

No community notes yet. Be the first to add context.