Rocket.Chat
Rocket.Chat is a fully featured, open-source communication platform that provides team messaging, video conferencing, file sharing, and omnichannel customer engagement. It supports channels, direct messages, threads, discussions, and integrations with external services via webhooks and apps. This stack deploys Rocket.Chat 7 backed by MongoDB 7 with replica set configuration for optimal performance and change-stream support. Rocket.Chat includes federation support for cross-server communication, end-to-end encryption, and a marketplace for extending functionality. The MongoDB instance is configured as a single-node replica set (required by Rocket.Chat) with persistent storage. After deployment, access the web UI on port 3000 to complete the setup wizard and create your admin account.
Included Services
rocketchat
rocket.chat:7
Environment Variables:
mongodb
mongo:7
Generated YAML
# Generated by ComposeHub (composehub.dev)
name: rocketchat
services:
rocketchat:
image: rocket.chat:7
restart: always
ports:
- 3000:3000
volumes:
- rocketchat_uploads:/app/uploads
environment:
ROOT_URL: ${ROOT_URL:-http://localhost:3000}
PORT: "3000"
MONGO_URL: mongodb://mongodb:27017/rocketchat?replicaSet=rs0
MONGO_OPLOG_URL: mongodb://mongodb:27017/local?replicaSet=rs0
DEPLOY_METHOD: docker
OVERWRITE_SETTING_Show_Setup_Wizard: ${SHOW_SETUP_WIZARD:-pending}
networks:
- rocketchat
depends_on:
mongodb:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:3000/api/info || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
deploy:
resources:
limits:
cpus: "2.00"
memory: 1536M
reservations:
cpus: "0.50"
memory: 512M
labels:
com.composehub.description: Rocket.Chat application server
mongodb:
image: mongo:7
restart: always
command:
- mongod
- "--replSet"
- rs0
- "--oplogSize"
- "128"
volumes:
- rocketchat_db:/data/db
- rocketchat_db_cfg:/data/configdb
networks:
- rocketchat
healthcheck:
test:
- CMD
- mongosh
- "--eval"
- try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongodb:27017'}]}) }
interval: 10s
timeout: 10s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.50"
memory: 1024M
reservations:
cpus: "0.25"
memory: 256M
labels:
com.composehub.description: MongoDB 7 database with replica set for Rocket.Chat
networks:
rocketchat:
driver: bridge
volumes:
rocketchat_uploads:
driver: local
rocketchat_db:
driver: local
rocketchat_db_cfg:
driver: local
Quick Info
- Services
- 2
- Networks
- 1
- Volumes
- 3
When to Use
This template is ideal for setting up a rocket.chat environment. All services are pre-configured with healthchecks, resource limits, and sensible defaults. Customize environment variables before deploying to production.
Tips
- Change all default passwords before deploying
- Review resource limits for your hardware
- Add a reverse proxy for production HTTPS
- Configure backup strategies for data volumes