Open-source alternatives guide
Self-Host Rocket.Chat for Omnichannel Messaging 2026
Self-host Rocket.Chat in 2026. MIT license, ~40K stars, TypeScript — Slack alternative with omnichannel (email, live chat, WhatsApp), federation, video.
TL;DR
Rocket.Chat (MIT, ~40K GitHub stars, TypeScript) is the most feature-rich self-hosted team communication platform. Beyond Slack-like channels and DMs, Rocket.Chat adds omnichannel — receive and respond to customers via live chat, email, WhatsApp, and Telegram all from one inbox. It also supports voice/video calls (Jitsi/BigBlueButton), federation with other Rocket.Chat instances, and E2E encrypted rooms. For customer support teams who want an all-in-one platform, Rocket.Chat is unmatched in open source.
Key Takeaways
- Rocket.Chat: MIT, ~40K stars, TypeScript — team chat + customer omnichannel in one
- Omnichannel: Live chat widget, email, WhatsApp, Telegram in a unified inbox
- Voice/video: Built-in via Jitsi Meet (self-hosted) or BigBlueButton
- Federation: Matrix protocol federation with other Rocket.Chat and Matrix servers
- E2E encryption: End-to-end encrypted rooms for sensitive communications
- vs Mattermost: Rocket.Chat wins on features; Mattermost is lighter and simpler
Rocket.Chat vs Mattermost vs Slack
| Feature | Rocket.Chat | Mattermost | Slack |
|---|---|---|---|
| License | MIT | MIT | Proprietary |
| GitHub Stars | ~40K | ~31K | — |
| Cost (self-hosted) | Free | Free | $7.25/user/mo |
| Omnichannel | Yes | No | No |
| Video calls | Yes (Jitsi/BBB) | Paid | Yes |
| E2E encryption | Yes | Paid | No |
| Matrix federation | Yes | No | No |
| Mobile apps | Yes | Yes | Yes |
| RAM usage | ~500MB+ | ~200MB | — |
| Setup complexity | High | Medium | Low |
Part 1: Docker Setup
# docker-compose.yml
services:
rocketchat:
image: registry.rocket.chat/rocketchat/rocket.chat:latest
container_name: rocketchat
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- rocketchat_uploads:/app/uploads
environment:
MONGO_URL: "mongodb://mongo:27017/rocketchat"
MONGO_OPLOG_URL: "mongodb://mongo:27017/local"
ROOT_URL: "https://chat.yourdomain.com"
PORT: 3000
DEPLOY_PLATFORM: "docker"
# Optional: admin setup
ADMIN_USERNAME: "admin"
ADMIN_PASS: "${ADMIN_PASSWORD}"
ADMIN_EMAIL: "${ADMIN_EMAIL}"
# Email:
SMTP_HOST: "smtp.yourdomain.com"
SMTP_PORT: 587
SMTP_USERNAME: "${SMTP_USER}"
SMTP_PASSWORD: "${SMTP_PASS}"
SMTP_From: "chat@yourdomain.com"
depends_on:
- mongo
mongo:
image: mongo:6.0
container_name: rocketchat_mongo
restart: unless-stopped
volumes:
- mongo_data:/data/db
command: >
bash -c "mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger"
mongo-init-replica:
image: mongo:6.0
command: >
bash -c "sleep 10 && mongosh mongo/rocketchat --eval \"rs.initiate({ _id: 'rs0', members: [{ _id: 0, host: 'mongo:27017' }]})\""
depends_on:
- mongo
volumes:
rocketchat_uploads:
mongo_data:
# .env
ADMIN_PASSWORD=your-admin-password
ADMIN_EMAIL=admin@yourdomain.com
docker compose up -d
Visit http://your-server:3000 → complete setup wizard.
Part 2: HTTPS with Caddy
chat.yourdomain.com {
reverse_proxy localhost:3000
}
Part 3: Omnichannel Setup
Rocket.Chat Omnichannel unifies customer communication:
Live Chat Widget
- Omnichannel → Configuration → Livechat
- Enable Livechat
- Omnichannel → Livechat → Installation → copy the embed code:
<!-- Add to your website: -->
<script type="text/javascript">
(function(w, d, s, u) {
w.RocketChat = function(c) { w.RocketChat._.push(c) };
w.RocketChat._ = [];
w.RocketChat.url = u;
var h = d.getElementsByTagName(s)[0],
j = d.createElement(s);
j.async = true;
j.src = u + '/livechat/rocketchat-livechat.min.js?_=201903270000';
h.parentNode.insertBefore(j, h);
})(window, document, 'script', 'https://chat.yourdomain.com');
</script>
Visitors see a chat widget. Agents receive chats in the Omnichannel inbox.
Departments
Route incoming chats to specific teams:
- Omnichannel → Departments → + New Department
- Name:
Sales,Support,Technical - Assign agents to each department
- Set routing policy (round-robin, load balanced, etc.)
Part 4: Video Calls with Jitsi
Integrate Jitsi Meet for voice/video:
# Admin → Administration → Video Conference → Jitsi
- Admin Panel → Video Conference → Jitsi
- Enable Jitsi
- Jitsi Domain:
jitsi.yourdomain.com(or usemeet.jit.sifor quick setup) - Click camera icon in any channel to start a video call
Part 5: Matrix Federation
Rocket.Chat supports Matrix protocol for cross-platform federation:
- Admin Panel → Federation → Matrix
- Enable Matrix
- Server name:
yourdomain.com - Home Server URL:
https://chat.yourdomain.com - Configure a Matrix homeserver (Synapse) if federating externally
# Test federation:
# In Rocket.Chat, invite a Matrix user by their MXID:
# @user:matrix.org
Part 6: Incoming Webhooks and Bots
# Create integration:
# Admin → Integrations → New Integration → Incoming WebHook
# Channel: #deployments
# Copy webhook URL
# Send message:
curl -X POST https://chat.yourdomain.com/hooks/YOUR-TOKEN \
-H "Content-Type: application/json" \
-d '{
"text": "Build complete",
"username": "ci-bot",
"icon_emoji": ":white_check_mark:",
"attachments": [{
"color": "#36a64f",
"title": "Deployment successful",
"fields": [
{"title": "Environment", "value": "production", "short": true},
{"title": "Version", "value": "v2.4.1", "short": true}
]
}]
}'
REST API bot
import requests
BASE = "https://chat.yourdomain.com/api/v1"
# Login:
resp = requests.post(f"{BASE}/login",
json={"user": "bot", "password": "botpassword"})
token = resp.json()["data"]["authToken"]
user_id = resp.json()["data"]["userId"]
headers = {"X-Auth-Token": token, "X-User-Id": user_id}
# Send a message:
requests.post(f"{BASE}/chat.postMessage", headers=headers,
json={"roomId": "GENERAL", "text": "Hello from Python!"})
# Get messages from a channel:
msgs = requests.get(f"{BASE}/channels.messages",
headers=headers, params={"roomId": "GENERAL", "count": 10})
Part 7: E2E Encryption
Enable end-to-end encryption for sensitive rooms:
- Admin → E2E Encryption → Enable E2E
- Users enable E2E for specific rooms: Room → Room Info → Enable E2E Encryption
- Each user generates their own key pair (stored encrypted in browser)
- Messages are encrypted client-side — server never sees plaintext
Note: E2E breaks search, notifications on locked devices, and message export. Use selectively for sensitive channels.
Part 8: Scaling with Multiple Instances
For larger teams (500+ users), run multiple Rocket.Chat instances:
services:
rocketchat-1:
image: registry.rocket.chat/rocketchat/rocket.chat:latest
environment:
MONGO_URL: "mongodb://mongo:27017/rocketchat"
MONGO_OPLOG_URL: "mongodb://mongo:27017/local"
# (same config as single instance)
rocketchat-2:
image: registry.rocket.chat/rocketchat/rocket.chat:latest
environment:
MONGO_URL: "mongodb://mongo:27017/rocketchat"
MONGO_OPLOG_URL: "mongodb://mongo:27017/local"
chat.yourdomain.com {
reverse_proxy rocketchat-1:3000 rocketchat-2:3000 {
lb_policy round_robin
}
}
Maintenance
# Update Rocket.Chat:
docker compose pull
docker compose up -d
# Backup MongoDB:
docker exec rocketchat_mongo mongodump --out /data/backup-$(date +%Y%m%d)
docker cp rocketchat_mongo:/data/backup-$(date +%Y%m%d) ./rocketchat-backup-$(date +%Y%m%d)
# Logs:
docker compose logs -f rocketchat
# Check health:
curl https://chat.yourdomain.com/api/v1/info
Why Self-Host Rocket.Chat
Slack charges $7.25 per user per month on the Pro plan. For a 50-person company, that's $362.50/month — $4,350/year — just for internal communication. Rocket.Chat self-hosted on a $30-40/month dedicated server handles that same 50 users with all features unlocked. The annual savings approach $4,000.
But cost is only part of the story. Rocket.Chat's omnichannel capability is genuinely unique in open source. No other self-hosted team chat platform lets you handle customer live chat, email support, WhatsApp messages, and Telegram inquiries in a single unified agent inbox. Intercom charges $74+/month for basic live chat. Freshdesk starts at $15/agent/month. A company running customer support on Rocket.Chat self-hosted saves thousands compared to these platforms while keeping all communication data on infrastructure they control.
The Matrix federation support opens another dimension. Your Rocket.Chat instance can federate with the global Matrix network — meaning your users can communicate with users on other Matrix servers (Element, Synapse, other Rocket.Chat instances) without accounts on your server. For communities, open source projects, or organizations that need external collaboration, federation removes the "everyone needs an account" barrier.
E2E encryption for sensitive channels is available at no extra cost, unlike Mattermost where it's locked behind a paid plan. Legal, HR, and executive teams can use encrypted rooms for confidential discussions while the rest of the organization uses standard channels.
When NOT to self-host Rocket.Chat: Rocket.Chat's resource requirements are substantial — MongoDB alone with write concerns and oplog uses 300-500MB RAM. Total stack RAM is 500MB-1GB or more. On a small VPS, this leaves little room for other services. Mattermost is the better choice for resource-constrained environments. Also, Rocket.Chat has historically been aggressive about prompting users to upgrade to paid plans through in-app notifications — expect to manage this in admin settings.
Prerequisites
Rocket.Chat's MongoDB dependency makes it one of the more infrastructure-demanding self-hosted team chat options. Plan accordingly.
Server specs: The absolute minimum is 4GB RAM, but 6-8GB is recommended for comfortable operation. MongoDB's oplog requires RAM to maintain performance, and Rocket.Chat itself uses 300-400MB. A production instance for a 20-person team needs at least a 4 vCPU/4GB RAM VPS. For 50+ users with omnichannel enabled, plan for 8GB RAM. Check our VPS comparison for self-hosters for value at the 8GB tier — this is one of the cases where a beefier machine genuinely matters.
MongoDB replica set: Rocket.Chat requires MongoDB with a replica set enabled (--replSet rs0) even in single-node deployments. This is for oplog support, which enables real-time updates. The mongo-init-replica service in the Docker Compose handles initialization. If you see "MongoServerError: not master and slaveOk=false", the replica set didn't initialize — restart the mongo-init-replica container.
Email configuration: Like Zulip, Rocket.Chat requires working email for user registration, password resets, and notification digests. Configure SMTP before onboarding users.
Domain and SSL: Rocket.Chat's mobile apps and WebSocket connections require HTTPS. Configure Caddy as a reverse proxy before anyone starts using the instance.
Skill level: Intermediate to advanced. The MongoDB replica set setup, SMTP configuration, and initial admin setup wizard have more steps than simpler tools.
Production Security Hardening
Rocket.Chat stores your entire team's communication history in MongoDB. A breach is severe — years of messages, file attachments, and potentially sensitive conversations. Proper hardening from day one is essential. Follow the self-hosting security checklist and these Rocket.Chat-specific measures:
Firewall (UFW): Never expose port 3000 or MongoDB's 27017 directly to the internet.
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
MongoDB binding: Ensure MongoDB is not exposed externally. The Docker Compose network isolates MongoDB by default — verify it's not using host networking or publishing port 27017. docker inspect rocketchat_mongo | grep -A5 Ports should show port 27017 not exposed to the host.
Secrets management: Admin password and SMTP credentials must be in .env, not hardcoded:
# .env (never commit this)
ADMIN_PASSWORD=your-strong-admin-password
ADMIN_EMAIL=admin@yourdomain.com
SMTP_USER=smtp-user@yourdomain.com
SMTP_PASS=your-smtp-password
echo ".env" >> .gitignore
Two-factor authentication: Enable 2FA in Admin → Account → Two Factor Authentication. Strongly encourage all users to enable it, and require it for admin accounts. Rocket.Chat supports TOTP (Google Authenticator, Authy).
Disable SSH password authentication: Edit /etc/ssh/sshd_config: set PasswordAuthentication no and PermitRootLogin no. Use SSH keys only. Restart: sudo systemctl restart ssh.
Automatic security updates:
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades
Regular MongoDB backups: mongodump creates consistent backups of all Rocket.Chat data. Run this daily and upload off-site. See automated server backups with restic for a production-tested approach that can run mongodump and upload the result to S3 automatically.
Troubleshooting Common Issues
Rocket.Chat fails to start — "MongoServerError: not primary and secondaryOk=false"
The MongoDB replica set isn't initialized. The mongo-init-replica container should handle this on first start, but it sometimes races. Wait 30 seconds after docker compose up -d, then run the initialization manually: docker exec rocketchat_mongo mongosh --eval "rs.initiate({_id:'rs0',members:[{_id:0,host:'mongo:27017'}]})". Then restart Rocket.Chat: docker compose restart rocketchat.
High memory usage — server swapping constantly
MongoDB's WiredTiger storage engine caches data aggressively. On a RAM-limited server, this causes continuous swapping. Add a MongoDB cache size limit: in the mongo service command, add --wiredTigerCacheSizeGB 0.5 (for 4GB servers) or --wiredTigerCacheSizeGB 1 (for 8GB servers). Rocket.Chat itself also has memory leaks in some versions — check whether upgrading resolves the issue before adjusting MongoDB.
Mobile apps show connection errors
Mobile WebSocket connections require stable HTTPS with a valid certificate. Verify your SSL cert is valid (not self-signed, not expired): curl -v https://chat.yourdomain.com/api/v1/info. Also check that the ROOT_URL environment variable exactly matches your actual URL including protocol — a mismatch causes WebSocket upgrade failures. Caddy automatically renews Let's Encrypt certificates, but verify the renewal is working with curl https://chat.yourdomain.com.
File uploads fail or disappear after restart
Uploads are stored in the rocketchat_uploads volume. If the volume isn't persisting correctly, files vanish on container restart. Check that the volume is properly defined in docker-compose.yml and that the volume mount path matches where Rocket.Chat expects files. For production, consider configuring S3 storage for uploads (Admin → File Upload → Storage Type → AmazonS3) to decouple uploads from container storage.
Omnichannel agents can't receive chats
Omnichannel routing requires agents to be marked as "available" in the Omnichannel panel. Check: 1) Livechat is enabled in Admin → Omnichannel → Configuration, 2) Agents are assigned to departments, 3) Agents have set their status to "Available" in the Omnichannel sidebar. Also verify your SMTP is working — the first-contact email notification depends on it.
Updates break functionality
Rocket.Chat's MongoDB schema migrations sometimes fail silently or incompletely. Before every update, run a manual mongodump backup. After updating, check docker compose logs rocketchat | grep -i "migration\|error". If a migration failed, the previous backup is your recovery path. Read the release notes for your target version before updating — some versions have breaking changes or require specific migration steps.
Rocket.Chat vs Mattermost: Which to Choose
The decision between Rocket.Chat and Mattermost for self-hosted team communication depends primarily on your team's needs around features versus resource efficiency.
Rocket.Chat wins decisively on raw features. Omnichannel customer support, Matrix federation, built-in video calling, E2E encryption, and a comprehensive API make it the most capable open source communication platform available. For organizations that want to consolidate both internal team communication and external customer engagement into one platform, Rocket.Chat is the clear choice. No other self-hosted tool offers the same breadth.
Mattermost wins on resource efficiency and simplicity. The Mattermost stack uses roughly half the RAM of Rocket.Chat and requires no MongoDB replica set configuration. For engineering teams that primarily need a Slack-like channel system with integrations to their development tools (GitHub, Jira, CI/CD pipelines), Mattermost is leaner and easier to operate. The performance at scale is also better per-resource.
For most small teams (under 25 people) with standard team chat needs and no customer-facing requirements, Mattermost is likely the more pragmatic self-hosted choice. For teams with active customer support needs, large organizations (50+ people), or requirements for federation and video, Rocket.Chat's feature depth justifies its infrastructure cost.
See the best open source community platforms for additional comparison with Discord alternatives and forum software that complements team communication tools.
See all open source team communication tools at OSSAlt.com/categories/communication.
See open source alternatives to Rocket Chat on OSSAlt.
The SaaS-to-Self-Hosted Migration Guide (Free PDF)
Step-by-step: infrastructure setup, data migration, backups, and security for 15+ common SaaS replacements. Used by 300+ developers.
Join 300+ self-hosters. Unsubscribe in one click.